Partition Deletion With fdisk Command On Linux Machine
Partition management is a serious issue, especially when it comes to removing them.
Türkçe okumak için lütfen linke tıklayınız. https://muhammederendemir.com/fdisk-partition-silme/
Greetings, I’m using LVM for disk management on Linux systems. While using LVM, I created an extra partition and had to delete it. I was able to delete the disk I created with the fdisk command.
⚒️ What should we do to wipe disk?
You need to use the fdisk command. Before typing any of the commands below, make sure you have a backup of important data. So how is this document, where did I go wrong, I was not going to erase this disk. Don’t say, I’ve been warned.👊🏼
Let’s type the following command to get a list of our partition schema
fdisk -l
Output:
In the output above we have a hard disk
/dev/sda
Let’s say we want to remove the /dev/sda partition from disk. Let’s type the following command:
fdisk /dev/sda
Output:
Type the p command to list partitions:
Command (m for help): p
Output:
Let’s come to the partition deletion process, let’s want to delete the /dev/sda3 partition. Let’s write the d command to delete a partition.
After the d command, it will ask us to enter a partition number to be deleted.
Command (m for help): d
Partition number (1-3): 3
so what happened? is it deleted now? yes, let’s check by listing the partitions are they deleted? 🤔
Command (m for help): p
Output:
I don’t see /dev/sda3 in the list, our deletion seems to be successful. 🙃
We have come to our last transaction that we should not forget. After saving the changes, let’s exit the fdisk shell system. We save the changes with the w command.
Command (m for help): w
We can use it by restarting our machine.
Thank you for reading!