What's the best way to completely wipe a disk with a corrupted GPT?

November 20, 2025 5 answers
Asked by Recipe swap+
I have a disk that's showing signs of a corrupted GPT along with a protective MBR. I'm not interested in keeping any of the data on it and just want to completely wipe it clean so that I can reformat it. I've tried using GParted and the Disks utility on Ubuntu, but I'm running into errors during the formatting process. Is there a straightforward method to fully erase the disk?

Answers

!one moment please
If your disk is an SSD or NVMe, try using `sudo blkdiscard -f /dev/(diskID)`. This command will reset all data blocks to factory default and is usually very quick. Just make sure you're targeting the correct disk.
Reply to this answer
woven_basket
You can use `gdisk` to zap the existing GPT information and create a new protective MBR. If that doesn't work for you, another option is to run `sudo dd if=/dev/zero of=/dev/sdX bs=512 count=34`. This command will zero out the first 34 sectors, effectively wiping the MBR and GPT tables.
Reply to this answer
glossary guest
You might want to check your BIOS settings; some systems have a secure erase feature that will fully wipe the drive and delete all partitions.
Reply to this answer
glyph9.alt
It's a good idea to install GSmartControl and check the disk's health. If you're facing errors, the drive could be having physical problems that might need addressing.
Reply to this answer
_under oath
For wiping the disk, you can also rewrite the GPT with anything you prefer, or simply overwrite the beginning of the disk to obliterate the old GPT. By doing this, you'll be able to use the drive however you want afterward. Also, could you share what errors you're encountering when trying to format? That info could really help diagnose the issue!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions