I have recently deleted all the files from my USB. Is this data permanently gone, or is there someway of retrieving it (I want to make sure it's gone forever!).

What are the best methods for sanitising a USB?

4 Answers 4


The only absolutely sure way to sanitize flash memory is a hammer. The problem is that flash drives have often physically bigger capacity to account for blocks that will be worn over time or to increase the lifetime of the disk (flash memory has limited write/erase endurance). For example you buy 2GB, but physically it is 2,2GB). There is a controller chip in every usb stick that keeps track of where each chunk of data is stored at any particular moment and which blocks are bad. You data may lie anywhere.

If you are using Linux then the best way I can think of is just dd if=/dev/zero of=/dev/sdX where X is your device (eg. /dev/sdd). It will overwrite as much as possible, so that most of the data will be removed (but keep in mind the spare hidden capacity of your flash drive). You most likely have to run dd as root and beware - if you type the wrong device name (eg. /dev/sda) you will wipe your main disk.


Hmm. Maybe connect memory chip to hardware flasher and fill it with 0xff and then with zeros? Or just put your flash drive into microwaver, burn it, throw away and buy a new one for $2.


Just normal formatting or deleting is never good enough, Best way is to secure wipe it, which replaces all the data with 0s. Any forensics tools (such as FTK) will be able to recover the files that was once stored in the USB. Best way is to google to find some software to secure wipe the thumb drive.

  • I'm not sure this really answers the question. You kind of answer the question, "how to do you securely wipe a drive?" with "securely wipe the drive - Google for the answer". Can you expand or go into further detail in your answer? Plus, I'm not sure that zeroing out a USB drive works the same way as a hard drive.
    – schroeder
    Sep 15, 2016 at 7:12

Most modern data storage (including hard drives and USB drives) includes unused spare sectors that the drive electronics swaps in to replace sectors that go bad over time. The data on the replaced bad sectors is not normally accessible by the OS (or the end user).

This means that if confidential data is stored on a sector that went "bad" and is replaced with a spare sector, the "bad" sector is no longer reachable by normal means. Even if you wipe all of the visible sectors on your drive, there is a chance that some of your data is still readable on one of the sectors marked as bad and is recoverable using certain tools.

The solution for all of this is to encrypt your drive when you first start using it. If the whole drive is encrypted, without your encryption key no one can read any data on your drive. This includes both normal sectors as well as out of use (replaced as bad) sectors.

If you have (ever) stored sensitive data on an unencrypted drive, the only safe way to destroy that data (as other answers mention) is to destroy the drive. In the case of a USB drive, this is either using a hammer or a microwave on the chips in the drive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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