I heard some people mention that files are deleted from flash drive for good, there is no tracing back. Is that really true?

If not, how do I permanently delete files from it? I have a sensitive file on a flash drive and before passing the flash drive around, I want to make sure nobody will be able to see that file.

link|improve this question

55% accept rate
15  
FLash drives are cheap, if it is that sensitive, don't pass it around. Why take chances? – JonnyBoats Dec 26 '11 at 22:13
1  
@JonnyBoats I plan to use this flash drive at home, but it's very possible one of the family members give it to somebody else accidentally. I just wanted to be safe. – progtick Dec 27 '11 at 1:27
Unless people are going to access the chips directly, overwriting once may be good enough. Some drive have "spare" cells they swap in to level wear and to replace bad cells. So over write more than once may get the space cells. In the future I would suggest encryption with a strong password then deleting/formatting may be enough. – Scott McClenning Dec 28 '11 at 23:07
feedback

8 Answers

The best delete tool that (little) money can buy:

enter image description here

EDIT: To counter the detractors

  1. No one mentioned the need for government level security, so arguments with that objective are pointless goalpost shifts. This is good enough for anyone who isn't James Bond or Bruce Wayne. P.S. Governments sanction shredders. What is a hammer but a high velocity shredder?
  2. Of course you need to bust up the storage chips within the thumbdrive. I thought that went without saying.
    • "Doctor, I got that bottle of pills from you but they did nothing!"
    • "Did you take the pills out of the bottle."
    • "No."
    • ಠ_ಠ

Furthermore, I did include instruction on how to do a thorough logical wipe of the thumbdrive.

END EDIT

Don't take chances. Flash drives are cheap and yes, data can be recovered from them. I've done it myself. You could DBAN it. You could also cipher /w a few times on a Windows machine (dd if=/dev/zero bs=2048 of=/mnt/disk/file on a *NIX machine). However, hitting things with a hammer is so much more fun and permanent.

link|improve this answer
7  
@ppumkin: I wouldn't trust such "BIOS IMPLEMENTED LOW LEVEL FORMAT"s for flash drives. Flash based media such as flash drives and SSDs have something called "wear-leveling" which happens at the hardware level. How to securely wipe data from such media is still an open question. Physical destruction is the only way to be sure. – Scott Pack Dec 27 '11 at 20:27
5  
@ppumkin: The Low Level Format that you're talking about was pretty much non-existent by late '90s for end-users. Some manufacturers do have their own tools which can do something similar (such as Seagate's SeaTools). However they were designed to work with the automagic bad sector recovery of magnetic disks. These days you're not likely to see an old school LLF outside of the factory. – Scott Pack Dec 28 '11 at 21:31
3  
@ppumkin The ATA command 0x50 (Format Sectors) doesn't actually format anything anymore (not since the mid-90s at best). On platter drives the command is implemented as ATA command 0xC0 (Erase Sectors). On flash media it usually only marks the block as free, it commonly doesn't erase the contents of the block. Further USB drives use the SCSI command set, and the SCSI command 0x04 only ensures that the disk is formatted and that a standard read command will return 0s. It does not force the drive to format (if that were even possible) and does not guarantee the actually erasure of the media – Chris S Dec 29 '11 at 20:44
3  
If you are re-using the (magnetic) media and do a proper 7-pass wipe you've met or exceeded any reasonable standard of "non-recoverable". This however is less applicable to flash media because of wear leveling. In either case the only sure-fire way to irrevocably and irretrievably remove a file from any media is destruction of that media (i.e. "Bash it until it's dust, then bash the dust some more to be safe!") – voretaq7 Dec 29 '11 at 20:58
3  
Worth knowing that on drives using perpendicular storage a single pass wipe is identical to multiple. – Chopper3 Dec 29 '11 at 21:01
show 15 more comments
feedback

It depends on who your adversary is. If it is a casual user, e.g. friend/coworker/spouse/etc., then preventing regular undelete is good enough: format the flash drive, then fill it with random/non-private files till it's 100% full, then format the flash drive again. Your original sensitive data will be gone for good, and unrecoverable using undelete tools or direct scan of the drive.

However, if your adversary is a major corporation, government, etc., then the only safe course is to destroy the media physically, e.g. burn your flash drive in a high-temperature industrial oven.

link|improve this answer
For casual users, just deleting the files normally is sufficient - most of them don't even realize files can be undeleted. And destroying a perfectly good flash drive (as with @Wesley's answer) because you are afraid your Great Aunt Sue is going to figure out how to access the raw wear-leveled data to recover your dirty photos is paranoid to an unhealthy level. – BlueRaja Dec 28 '11 at 0:35
1  
@BlueRaja: For a casual user, undelete is at the far end of "how to restore deleted photo" google query... Certainly within reach of Great Aunt Sue. And as I said, destroying your media physically is only needed if your adversary is very well-funded and resourceful. – haimg Dec 28 '11 at 1:03
feedback

There's an excellent free open-source program called Eraser ( http://eraser.heidi.ie/ ) that removes data by overwriting it with your choice of data patterns - high level security for data erasure.

But - there is a big issue with flash drives when erasing by overwriting. The problem is the "wear leveling" methods used on solid state drives, which writes in a different place each time you add or replace data. There is a full explanation and discussion at http://bbs.heidi.ie/viewtopic.php?f=2&t=1568

The short answer - erase the file but also use the "erase open space" function in the Eraser program. This overwrites all unused space, including the earlier version of your file.

link|improve this answer
2  
+1 for eraser.heidi.ie on Windows. – Nick Josevski Dec 27 '11 at 5:36
feedback

Because of wear leveling of modern flash devices, it's not under your control. You think you've overwritten your data 25 times, it may still be there. If you want to store sensitive data on a flash device, use an encrypted container like truecrypt, so you won't be in trouble when you lose the device (unless you give away the key).

link|improve this answer
feedback

Use shred.

shred /dev/sdx -n 25 

should clean your drive well.

link|improve this answer
It will, because when the drive gets full, it will be forced to write at every location. – Loke Dec 28 '11 at 5:15
feedback

I heard some people mention that files are deleted from flash drive for good, there is no tracing back. Is that really true?

NO, A Files start with a bit referred to as a flag. When you delete a file,what you are doing is actually setting the flag off, which tells the computer that the space is now free to hold new data.

If you really want to destroy the data on a disk, you need to repeatedly overwrite the data with a random mixture of 0's an 1's. Just doing a format won't work because someone with the proper sniffing hardware & software can restore and reset the flags so the data can be read.

  1. One way you can do this without anyone's help is, write_data - delete_data - write_data - delete_data - write_data - delete_data :) (ensure every bit of the drive gets written to, and that what you write is sufficiently random)

  2. Use a file shredder , Google it and you'll get many free file shredders, if you have bit-defender, I've seen file shredder in-built in that.

link|improve this answer
1  
Just write data - delete data is a bit simple: you need to ensure every bit of the drive gets written to, and that what you write is sufficiently random, else there might still be ways to detect what data used to be there. – Konerak Dec 27 '11 at 15:17
@Konerak edited the answer to include your points too :) – Sanjay Dec 27 '11 at 15:32
feedback

I plan to use this flash drive at home, but it's very possible one of the family members give it to somebody else accidentally. I just wanted to be safe. – progtick

In that case, you won't have the chance to delete the files beforehand anyways.

Just encrypt your files, and don't worry about deleting them if the drive is ever lost - no one will be able access them without the password.

link|improve this answer
no, I already know what files I need to delete. I dont usually put sensitive files on flash-drive anyway, but somebody in family did. I dont want to know throw away the flash-drive yet, since we are primarily using it at home, so I just wanted to delete the particular files. – progtick Dec 28 '11 at 0:50
feedback

System Mechanic has a tool called Incinerator which does exactly what you are asking for.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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