resizepart (Parted User’s Manual)

From Get docs
Parted/docs/latest/resizepart

Next: rm, Previous: rescue, Up: Command explanations   [Index]



2.4.10 resizepart

Command: resizepart number end

Moves the end position of partition number. Note that this does not modify any filesystem present in the partition. If you wish to do this, you will need to use external tools, such as resize2fs.

When growing a partition you will want to grow the filesystem afterwards, but when shrinking, you need to shrink the filesystem before the partition.