Knowledgebase

How long after deleting a file from a USB flash drive can it still be recovered?

2 minutes.

No, wait… it could be 2 days…

…or two weeks, two months, or two years.

Your question can’t be answered because it entirely depends on how the USB flash drive is being used. If you delete a file and then put it in a drawer for two years without touching it, you should still be able to recover the deleted file.

But if you start copying files to the drive right after deleting something, you may write over that space immediately. In which case, not even two minutes will be long enough.

Here is how drive storage works (it doesn’t matter if it is USB, SSD, or a hard disk):

  1. When you copy files onto a brand new drive, the files are copied in their entirety, one after the other (maybe, but let’s assume so for the purpose of this example). So let’s say you copy 3 files onto a brand new drive.
  2. Now you delete file #2. Files #1 and #3 don’t move. They stay right where they are. File #2 doesn’t move, either, but the space it is using is tagged as available by the operating system.
  3. So now you copy file #4 to the USB drive. It immediately copies what it can into the first available space, which would be the space occupied by file #2 which you deleted, making that space available. If it all fits, that’s great — but your file #2 is now gone.
  4. If it doesn’t fit, file #4 is split into two parts. One will fill up the space formerly occupied by file #2, and the rest will be copied after file #3.

Now imagine copying and deleting a bunch of files over time.

  1. Let’s say instead of 4 files you have copied 400 files.
  2. Some have been deleted over the course of time. Let’s say there are 100 deleted files and the last file you deleted was #395.
  3. Now you copy file #401. It copies into the space made available when you deleted the other 99 files first. So as long as file #401 is not larger than the sizes of all the 100 deleted files, deleted file #395 is still there and can be recovered.

You will be able to recover file #395 as long as another file has not been copied to that space. So it really could be minutes, days, weeks, months, or years.

The above is a bit of an oversimplification, and not all operating systems treat storage exactly the same way. There are some processes some computers do (either automatically or with the help of third party software) that defragment the drive. But the nature of USB drives is such that it is unlikely it would be defragmented unless you did it on purpose, since it doesn’t stay plugged into the computer.

First answered March 2020. Updated December 2026.

Apple ID, iCloud and backups

If this helped you, consider buying me a slice of pizza to help keep the site running. If this solved a big problem for you, consider buying me the whole pie!

Slice Pie

Need help with this?

I help people in New Orleans and online with Apple gear, websites and more. Contact me or see more answers in the Knowledgebase.

What can I help you with?

No call centers. No runaround. Just me.

Let’s talk