Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally set a passphrase on my USB drive using Ubuntu Disk Utility and I don't remember it. I tried formatting the USB drive, but it doesn't allow it.

I've tried to do it in both Ubuntu and Windows. What should I do?

share|improve this question
What USB drive is it? How did you set the passphrase? – user3463 Jul 17 '12 at 1:04
@RandolphWest It's 4GB DataTraveler G2 Kingston. I set passphrase in Ubuntu Disk Utility. – hey Jul 17 '12 at 1:16
up vote 8 down vote accepted

Try to call up the Disk Utility again on the same computer which you used to encrypt the external disk. If you have used the "Remember forever" option the passphrase will still be there:


If this doesn't work and you absolutely don't remember the passphrase, the contents of the disk are lost since they were encrypted using this passphrase. Your only remaining option is then to use the Disk Utility to format the volume again to remove the encryption, therefore losing all data (but at least regaining an empty and usable disk).


share|improve this answer
This screenshot shows the mouse over "Change Passphrase" though the item you will want to choose to erase the USB stick is Format Volume. – Michael Hampton Jul 19 '12 at 7:34
@harrymc: I can swear I did this 2 days ago and it didn't work, I tried it now, and it worked! Thanks! – hey Jul 19 '12 at 11:49
@harrymc: Actually it doesn't work. Now I tried to transfer my files to Windows and it asks me to Format USB and it says it's unable to do so. – hey Jul 19 '12 at 11:57
Windows requires NTFS as disk format (also supported by Ubuntu). – harrymc Jul 19 '12 at 13:04
You could try formatting it in Windows instead, then see if it works in Ubuntu. – harrymc Jul 23 '12 at 14:23

Assuming your data is gone and lost, I would format the drive using dd

sudo dd if=/dev/zero of=/dev/USB_DEVICE

changing USB_DEVICE to the correct one (on my ubuntu, the only pen drive plugged is said to be /dev/sdb)

mind not to type numbers after the device, because that will only erase the single partition, while you probably want to have at out-of-factory status

share|improve this answer
I would do this. But this method won't format the drive, it will just erase it's contents. After this you would be able to format it using the Disk Utility. – criziot Jul 25 '12 at 20:44
yes. it's very similar (if not identical) to what HD specific utilities called "low level format" – Federico Fissore Jul 25 '12 at 21:18

You should be able to completly format the USB drive with GNU parted from the Ubuntu system. If you are not sure which /dev the drive gets assigned just keep an eye on /var/log/messages when plugging it using sudo tail -f /var/log/messages. A message will appear there when you plug the drive so you can identify it in order to format it with parted.

Then format the partition with /sbin/mkfs -t ext3 /dev/sdc1 (if you want ext3 of course) . Perhaps this step is the only real necessary.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .