Show Table of Contents
13.3. Removing a Partition
Warning
Do not attempt to remove a partition on a device that is in use.
Procedure 13.3. Remove a partition
- Before removing a partition, boot into rescue mode (or unmount any partitions on the device and turn off any swap space on the device).
- Start
parted, where/dev/sdais the device on which to remove the partition:# parted /dev/sda - View the current partition table to determine the minor number of the partition to remove:
# print - Remove the partition with the command
rm. For example, to remove the partition with minor number 3:# rm 3The changes start taking place as soon as you press Enter, so review the command before committing to it. - After removing the partition, use the
printcommand to confirm that it is removed from the partition table. You should also view the output of/proc/partitionsto make sure the kernel knows the partition is removed.# cat /proc/partitions - The last step is to remove it from the
/etc/fstabfile. Find the line that declares the removed partition, and remove it from the file.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.