Nearly everyone has accidentally deleted a file before. Whether it’s family pictures or important documents, all files are just data on your hard drive, and that data doesn’t exactly go away after you delete it. There are plenty of ways to recover them after being sent to the trash.
Today we’re going to show you a couple of ways to get those files back, because even when things are deleted, they aren’t always completely gone. And hopefully if one of the methods doesn’t work, one of the other ones will.
Keep Regular Backups to Prevent Deletion in the First Place
macOS’s Time Machine is a great, built-in way to handle backups automatically. If you have an old external hard drive lying around (or some spare cash for a new one), hook it up and then navigate to System Preferences > Time Machine > Select Backup Disk. You can select your external hard drive, and turn on automatic backups.
Time Machine keeps your computer’s data securely backed up on your external hard drive, and you can browse back in time through old versions of your files.
If you don’t trust your old hard drive (or you want an additional offsite backup), you can always use something like Arq, which lets you back up to the cloud using your own AWS S3 instance, Google Drive, or Dropbox.
Check the Trash Can
Hitting “Delete” doesn’t actually delete files. It sends them to the trash, which you have to manually empty to get rid of them forever.
The Trash is usually located at the end of your dock. Right-click it and click the “Open” command. It should give you a list of files that you’ve deleted recently—at least, since the last time you emptied it. And if you haven’t emptied it in a while, doing so might get you back quite a bit of disk space.
Check the Other Trash Cans
If your file was stored on a USB flash drive or external hard drive, those have their own Trash you can check for deleted files. They’re hidden by default, though, so you have to do a little digging.
Whenever you use an external drive, your Mac creates a bunch of hidden folders starting with a period to help the drive work better with macOS. One of these hidden folders is “.Trashes” and it contains the trash for that drive.
Enable Hidden Files in Sierra or Later
If you’re using macOS Sierra or later, you can view hidden files in Finder by simply using the SHIFT+CMD+. hotkey (that’s the period key).
If You’re Using an Older OS X Version
You can enable hidden files in Finder by running the following commands in Terminal. Press Command+Space and type “Terminal” to bring it up. At the prompt, paste these two lines in there one at a time, hitting Enter after each line:
After running these commands, you should be able to see the “.Trashes” folder. You can even empty it from Finder to clear some space on a USB stick.
Should you want to stop showing hidden files (they’re hidden for a reason, and there are a lot of them), you can run the same commands in Terminal again, but replace “TRUE” with “FALSE” on the first line:
That should clean things up for you.
If All Else Fails, Use Disk Drill
Even when you empty your trash, deleted files aren’t removed from your hard drive right away. Instead, macOS marks them as available space. Your data is still there until it gets overwritten by something else. This means that if you have an app that can read the files directly off your hard drive, you could recover them in full if you do it quickly enough after deletion.
One tool that does this very well is Disk Drill. It scans your hard drive for any files that are still waiting to be overwritten and recovers them for you, bringing your documents back from the computer grave.
Note that any extra data you put on your hard drive could overwrite the files, so if you’re extra cautious, download Disk Drill on another computer and put it on a flash drive. The last thing you want is that download overwriting the data you want to recover.
When you open it for the first time, Disk Drill will ask you to select your disk and perform a scan. Select OS X if you want to scan your main disk. The scan may take a few minutes, but when it’s done, you’ll be presented with a list of recently deleted files. Many of these are junk, but if you know what you’re looking for (pictures, for example) you can sort them and open the folders you want. Most files should be under your home directory with your name on it.
Once you’ve found the files, right-click them, choose the “Recover” option, and then select the directory where you’d like to save the recovered files. Ideally, you should use an external drive to prevent other files from being overwritten. For this demonstration, I just used my hard drive, and it worked fine.
If all goes well, you should see your recovered files appear in the directory you chose. I deleted a screenshot on my desktop, emptied the Trash, and was then able to recover it with Disk Drill, 100% intact.
Your odds of recovery will go down for older files—since your computer has had more time to overwrite them—so it’s best to act quickly after discovering you’ve accidentally deleted a file.
Note that you will need to buy the full version of Disk Drill to recover files. The free version only scans for files and shows you that they exist. This isn’t too bad though, because at least you can verify that your files are there before buying the app.
The exception to this is if you have Disk Drill already installed, you can use their “Recovery Vault” to track deleted files and save a copy when you delete them. This ensures that whenever you accidentally remove something, you can always get it back, and it’s a completely free feature. It does use extra hard drive space though, so it’s not for everyone.
Disk Drill isn’t the only data recovery tool around. PhotoRec is a free app that can recover photos and other files, though it is a bit clunkier to use. There are other commercial options, such as Data Rescue and EaseUS, but they all share the same price point as Disk Drill. Overall, many of these tools will have low success rates, and Disk Drill is good for being able to see which files are intact before buying.
Image Credits: Shutterstock