How do you delete all partitions on a device from the command line on Linux (specifically Ubuntu)? I tried looking at fdisk, but it presents an interactive prompt. I'm looking for a single command, which I can give a device path (e.g. /dev/sda) and it'll delete the ext4, linux-swap, and whatever other partitions it finds. Essentially, this would be the same thing as if I were to open GParted, and manually select and delete all partitions. This seems fairly simple, but unfortunately, I haven't been able to find anything through Google.
|
feedback
|
|
Would this suffice?
| |||||||||
feedback
|
|
See | |||
|
feedback
|
|
Quick and Dirty: use Alternatively: | |||
|
feedback
|
|
You should be able to use parted for this aswell, although that may involve some scripting to loop through the partitions. | |||
|
feedback
|