How to increase the partition size of root disk in ubuntu linux?

I have some 55 Gb unallocated space in my disk and I want to give it to root but I can't resize the root disk. I even tried to do it by bootable live USB but inside Gparted, the root partition doesn't show available 55 GB space.

GParted screenshot


Solution 1:

To be able to increase the size of your root partition, the empty space must be contiguous (right next to) the root partition.

To do this, you will need to boot from a USB, then using gparted

  1. Move the swap partition as far to the right as possible
  2. Move the /home partition as far to the right as possible
  3. Expand the root partition

Please not that this is not a fast set of operations, and it is not without risk. Backup your data before you undertake this operation.