Linux Commands - Delete a disk partition using the fdisk command

by
Jeremy Canfield |
Updated: April 01 2024
| Linux Commands articles
Type fdisk /dev/xxx and press enter, where xxx is a device, such as /dev/sda or /dev/sdb.
[root@server1 ~]# fdisk /dev/sdb
Type d and press enter to delete a partition.
Command (m for help): d
Something like this should be displayed.
Selected partition 1
Partition 1 is deleted
Type w and press enter to write the changes.
Command (m for help): w
Use the partprobe command to update the system to recongize the change.
~]# partprobe
Did you find this article helpful?
If so, consider buying me a coffee over at