We’ve all experienced that horrible stomach-churning pang of dread when we delete a file that we didn’t meant to delete. Or when we realise that the file we trashed last week is the one we need for an important piece of work that’s due to be submitted tomorrow. The bad news is that there’s no Mac undelete feature. The good news is that, most of the time, and depending on what steps you’ve taken beforehand, it’s relatively easy to recover deleted files on Mac.
Check if the file has really been deleted
The first step is to check if the file is gone. If you dragged it to the Trash but haven’t emptied it recently, it should still be there. Click on the Trash icon in the Dock and inspect the Finder window that opens. If you see the file, drag it out of the Trash and onto the Desktop. If the file isn’t there, things get more complicated, but there’s still hope.
How to recover deleted files on a Mac with Time Machine
This is the part where we remind you that you should have a regular incremental backup plan in place. Preferably, it should incorporate two separate backups to two different destinations, in different physical locations.
If you use a tool that makes a bootable clone, such as Carbon Copy Cloner or SuperDuper, and regularly update the clone, all you have to do to recover a file is mount the clone and copy the file back to your Mac. If you take away nothing else from this article, please understand the importance of backing up your Mac on a regular basis. Your future self will thank you for it.
The simplest way to backup files on a Mac is to use Apple’s Time Machine, which is installed as part of macOS. You set it up once and forget it. Assuming you use Time Machine, it’s very easy to recover individual files. Here’s how:
1. Go to the Time Machine menu in the Mac’s menu bar and choose Enter Time Machine.
2. Swipe upwards with two fingers on your Mac’s trackpad or press the up arrow next to the Finder window that appears in order to navigate to a time before you deleted the file.
3. Once you’ve reached a backup from a time before you trashed the file, click on the Finder window and navigate the Finder in the normal way until you find the file you want to recover.
4. Press the spacebar to preview the file, and if it’s the one you want, click Restore. The file will now be restored to your current Finder and you’ll be able to open and edit it.
How to recover deleted photos on Mac
When you delete a photo in the Photos app, it doesn’t get rid of it straight away. Instead, it outs in an album called Recently Deleted and keeps it there for 30 days. Then it’s removed permanently. So, if the photo you want to recover was deleted less than 30 days ago, all you have to do is go to Recently Deleted, under Library in Photos’ sidebar, click on the photo you’re looking for and press Recover. It will then be moved back to your main Library.
How to recover music files in iTunes
If you delete a track from iTunes, it asks you if you want to move the file to the Trash. If you said no, all you have to do to recover the file is go to the Finder and navigate to your iTunes music folder (usually in Music>iTunes>iTunes Media), find the file and drag it onto the iTunes icon in the Dock.
If you said yes, and the file is still in the Trash, do the following.
1. Launch iTunes and choose Preferences from the iTunes menu.
2. Click the Advanced tab.
3. Makes sure there’s a checkmark in the box labelled 'Copy files to iTunes Media folder when adding to library’.
4. Close Preferences.
5. Drag the file from the Trash onto the Desktop.
6. Drag it onto iTunes’ icon in the Dock.
7. When it’s imported, drag the file from the Desktop back to the Trash (a copy will have been added to your iTunes folder).
If you’ve emptied the Trash since you deleted the file from iTunes, you can use Time Machine to find it in the earlier version of your iTunes folder and recover it from there.
File recovery on Mac: How restore older versions of a document
Built in apps on macOS, such as Text Edit and Preview, as well as the iWork apps and many third party applications use a feature of the operating system known as versioning. That means that when you open a file and edit it, macOS retains copies of previous versions of the file so you can revert back to them if you need to.
Here’s how to use it:
1. Open the file.
2. Click on the File menu and choose Revert to then Browse all versions.
3. You’ll see that the screen changes and looks a bit like Time Machine.
4. To find the version you want to revert to, click on the tick marks on the right of the screen or click on the title bars of the documents on the right of the screen, or click the up arrow to the right of the documents.
5. You’ll see the date of each version displayed below its preview. If the document preview doesn’t display automatically, click Load Version to download it from iCloud.
6. When you find the version you want to revert to, click Restore or to open it as a new document, hold down the Option key and select Restore a Copy.
If you open a document, make changes to it, then decide you don’t want to save them, go to the File menu and select Revert To, then Last Opened.
Data recovery on Mac when you don’t use Time Machine
If you don’t use Time Machine, all is not lost (though we’d suggest you start using it — it’s the easiest way to recover files you accidentally delete).
There are several options when it comes to data recovery software for Mac. One of the best is Disk Drill, which scans your Mac for deleted files, allows you to specify the kind of file you’re looking for — text document, audio, file or video, for example, and lists everything it finds. You can then preview files to check if they’re what you’re looking for and recover them if they are.
The key point when using any data recovery tool is to stop using your Mac as soon as you realise you need to recover a file. When you empty the Trash, files in it aren’t deleted immediately. Instead, the reference to them in the file index is removed and the space they occupy made available for use. If you stop using your Mac immediately, the file won’t be over-written and data recovery software will have a good chance of recovering it intact. The longer you use your Mac, the more chance there is of it being over-written completely.
How to delete files safely
If you want to delete files easily and never worry about removing the wrong ones, use a great tool CleanMyMac X. Its Smart Scan relies on just one button to scan your Mac and then remove all the junk it finds. All the files are 100% safe-to-delete as CleanMyMac always refers to the Safety Database in order to correctly select and remove the junk. Moreover, you can always view the files before removing them and decide whether you really want to get rid of them. CleanMyMac is incredibly easy to use, so give it a try. It's available for a free download here.
Mac data recovery: the last resort
If none of the above solutions work, and if the deleted files are very important, the last resort is to take your Mac to a specialist data recovery company. These services use specialist software to interrogate your Mac’s drive and rebuild lost files. However, it’s a very time consuming and expensive process and a step you should only consider if the files you need are more important than the cost of recovering them or you really can’t live without them. If you do decide to use such a service, research the companies carefully and, if possible get word of mouth recommendations from people you trust. And, as with using data recovery software, stop using your Mac immediately.
To conclude, putting a file in the Trash doesn’t delete it. And even emptying the Trash doesn’t get rid of it completely. There’s still the possibility of recovering it. However, by far the best way of making sure you don’t irreversibly delete a file you need is to make regular backups of your Mac. If you do that using the built in Time Machine, recovering a file or folder you’ve trashed is very easy indeed.