How to Resize a Partition in Debian 12

Resizing a partition in Debian 12 either increases the storage capacity of the partition or decreases it. Sometimes the created partition is not in much use, so we want to shrink the partition and increase some other partition whose storage capacity is alarming. 

There are different command-line tools to resize a partition as well and graphical user interface-based applications are also available. 

This post will explain all these methods in detail to resize a partition in Debian 12. 

What are the Methods to Resize a Partition on Debian 12?

Both the command-line and graphical user interface methods to resize the partitions in Debian 12 are:

  • Using the fdisk command
  • Using the GParted application

Method 1: Resize a Partition Using the fdisk Command

To use the fdisk command for resizing a partition, follow the below-mentioned steps. 

Step 1: Open the Terminal

First launch the terminal to run the commands:

Step 2: Backup the Data

It is recommended to create a backup of the partition which is supposed to resize. Sometimes due to some error, it might be possible the partition gets corrupted and then creates a new one. 

Step 3: Find the Partition

Now find out the partition that is supposed to resize and its size by the following command:

$ sudo fdisk -l

Step 4: Resize the Partition

Once the partition is identified, use the “parted” command to resize it:

$ sudo parted [partition name] resizepart [partition new size] [%]

For example, if you want to create two partitions of the 30% free space of the “/dev/sda” drive, then your command will be:

$ sudo parted /dev/sda resizepart 2 30%

Step 5: Verify the Changes

To verify the changes, display the partitions with their relevant information with the command:

$ df

The partition will be resized successfully using the fdisk command utility. 

Method 2: Resize a Partition Using the GParted Application

Another approach to resizing the partition on Debian 12 is by installing and using the GParted application. First, install the GParted application with the command:

$ sudo apt install gparted -y

Launch the installed “GParted” application on Debian 12 from the “Application’s” menu:

When the application is open, click on the partition whose size is supposed to be altered:

Then click on the “Partition” option from the menu bar and select the “Resize/Move” option:

Then assign the partition size and click on the “Resize” to resize the partition:

The partition will be resized according to the new instructions.

These are the two methods to resize a partition on Debian 12. 


To resize a partition on Debian 12, either use the “fdisk” command utility or install the “GParted” application from Debian’s default repository. Both methods are easy to understand as well as to use. Both methods to resize a partition on Debian 12 have been explained in this blog.