How to Delete Partitions from Storage Media
When it comes to trying new Linux distros, I find myself deleting hidden partitions from time to time. This is also useful when software tools set up your USB flash drive or SD card and you end up seeing only a portion of total available space. Be sure to backup your important files as this would completely wipe everything. Here's how to reclaim the entire usable capacity from your storage media:
On Windows, open the CMD prompt as admin and enter diskpart
.
- Once you're in the utility, start with
list disk
- Determine which number belongs to the USB drive or other storage medium (the capacity of the device usually good indicator)
- Next enter
select disk [YOUR DISK NUMBER]
- Once you chose the appropriate one, type
list partition
- Then
select partition 0
anddelete partition [override]
(use "override" to get rid of stubborn OEM partitions) - Repeat as necessary for multiple partitions
- When all the partitions are deleted, enter
create partition primary
or go into Disk Management after to allocate your medium
For Linux based OSs there tools like fdisk
, mkfs
, and parted
. They may require elevated privileges or for you to be in root for them to work properly.