USB delete partition error

Trying to delete a partition on a USB, is mounted, when I attempt to delete the partition the following error message pops up. Tried re-format, no go.

Included is the Disks app description


You can run fdisk on it

sudo fdisk /dev/sdb1

IF that fails, you can zap it

sudo sgdisk --zap-all /dev/sdb1

Tried fdisk, responds command not found.

Tried sudo sgdisk --zap-all /dev/sdb1; result:

~$ sudo sgdisk --zap-all /dev/sdb1
[sudo] password for redearthman:
Problem opening /dev/sdb1 for reading! Error is 2.
The specified file does not exist!
Problem opening ‘’ for writing! Program will now terminate.
Warning! MBR not overwritten! Error is 2!

…and the partition is still there.

Try the following for fdisk


command -v fdisk

sudo fdisk /dev/sdb1

Hmmmm. Perplexing.

Here’s the result:
redearthman@redearthman-Lenovo-IdeaPad-S145-14AST:~$ PATH="/sbin:$PATH"
redearthman@redearthman-Lenovo-IdeaPad-S145-14AST:~$ command -v fdisk
redearthman@redearthman-Lenovo-IdeaPad-S145-14AST:~$ /sbin/fdisksudo fdisk /dev/sdb1
bash: /sbin/fdisksudo: No such file or directory
redearthman@redearthman-Lenovo-IdeaPad-S145-14AST:~$ ^C

So basically the error message relates to not being able to read the partition table as opposed to not seeing the disk, yes?


Well, have you tried simply overwriting the partition? OR formatting it first, then trying to delete?

Yup! Tried both. may just have to go with the bad usb story. Unless there was some way I locked it, but settings on disks don’t bear that outr.

1 Like

Hi, if you’re trying to delete the partition using fdisk or gdisk do not enter to the child which is sdb1 use

fdisk /dev/sdb

And from there delete sdb1

Install fdisk or if it won’t help, use gdisk

Also if you are trying to format a partition or drive, make sure the drive is unmounted then format it.