Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a usb drive which I would like to put a linux distribution on but it already has some files on it on /dev/sdc1. Using fdisk, I deleted the first partition and wrote the changes. When I printed the table, the first partition was gone.

Then I created a new partition (/dev/sdc1).

However when I wrote these changes to the usb, the old files were still there. I followed these instructions after deleting the first partition http://www.zorge.net/?p=22

Are there any commands in fdisk (I'm trying to get comfortable in fdisk, so no gparted for me) to completely wipe out all the information on a drive?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

fdisk manages partitions, but does not format or write data to the disk.

To format the disk, use mkfs

mkfs.vfat /dev/sdxy # /dev/sdxy is your usb

# Or for ext4
mkfs.ext4 /dev/sdxy 

But, even formatting does not over writ your data. To over write your data use dd or a utility such as scrub

scrub /dev/sdxy

See also man scrub

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.