How to recover deleted files on Mac

11 min read

Some time ago, I had that heart-stopping moment when I accidentally deleted an important file. Worse still was realizing the document I had also gotten rid of last week was crucial for a deadline the next day.

Is it possible to recover deleted files on Mac?

Determined to find a solution, I researched this topic back and forth. While the Mac doesn’t offer a straightforward file recovery feature, I have found that it is usually possible to get your lost stuff back.

In this article, I’ll show you how to recover deleted files on Mac with an extensive selection of solutions. These methods will cover various scenarios you might encounter. Let’s dive in.

Problem Solution
I need to quickly recover a file I just deleted Command + Z to undo the action if just deleted.
Install Disk Drill, run a scan, and recover selected files.
I accidentally deleted a file Open the Trash icon in the Dock. Right-click the file and choose Put Back.
I permanently deleted my file Run a scan on your Mac with Disk Drill or try recovery from macOS Time Machine.
I want my photos deleted less than 30 days ago back Go to the Recently Deleted folder in the Photos app, select and recover the photos.
Emails deleted less than 30 days ago Open the Mail app or email browser. Select Trash from the sidebar. Find the email and move it back to your inbox.
I often lose important files Back up using Time Machine or Get Backup Pro.

Easiest way to recover deleted files

When my search for the missing files came up empty, I knew I couldn’t afford to waste time. Thankfully, I quickly found a helpful tip online that saved the day.

Disk Drill is a popular solution among Macintosh users for recovering deleted files. It can help you find files that you’ve deleted from the Recycle Bin or that have been lost due to a software malfunction.

To see all the files that can be recovered, install the app and run it to scan on your Mac. Browse the results or search by exact file name or extension.

Select the files you want back and click the blue Recover button on the bottom right. Choose where you want to put the file and you are done.

disk drill file recovery

Disk Drill is also suitable for iPhones and iPads. Just connect the device to your Mac and take the above steps. 

Recover deleted files on Mac from Trash 

This might be an obvious one, but just to be sure you didn’t miss anything, click on the Trash icon in your Dock and go through the files there. 

How to recover deleted files on Mac using Undo

If you’ve just deleted your file and haven’t performed any other actions on your Mac, here’s how to recover this file from Trash on Mac almost instantly.

Without exiting the folder, press Command + Z hot key combination to see your file return immediately to the folder.

That’s it, just like magic.

Retrieve deleted Mac files using Time Machine

This is a reminder that you should have a regular incremental backup plan in place. Ideally, it should include two separate backups to two different destinations in different physical locations.

One of the easiest ways to back up files on a Mac is to use Apple’s Time Machine. It is a free backup tool included with your macOS. If you’re using Time Machine, it’s easy to recover individual files. 

Here’s how:

  1. Connect the storage device containing the Time Machine backup to your Mac.
  2. Open Time Machine by clicking the clock icon on your Mac’s menu bar. If the icon isn’t in the menu bar, you can find Time Machine in the Applications folder.
  3. Use the timeline on the right side of the screen to navigate to the date you think the file was last present.
  4. Scroll through the Finder window to find the folder and file you want to recover. You can use the search bar to find the file. There may be multiple versions of a modified file, and you can choose the version you want.
  5. Select an item to restore and press the spacebar to preview it.
  6. Click Restore to recover the selected file or folder.

Recover deleted files using Terminal

I did a quick search for ways to restore deleted files on Mac and saw guides on how to do that with the help of the Terminal app. This method requires me to enter some potentially intimidating commands. But ok, let’s try it. 

  1. Open the Terminal app on your Mac. From Spotlight Search (Command + Space), search Terminal, then hit Enter or click the result.
  2. Enter the command cd .Trash and hit Return to go to the Trash folder.
  3. Type ls and press Return. This command will display the contents of the Trash Bin, allowing you to see all the deleted files that are currently stored there.
  4. Use the mv command to recover your file by typing it in this format: mv [filename].[extension] [destination]. For example: mv photo5.jpg ~/Desktop/
  5. Type Quit to close Terminal.
  6. Open a Finder and navigate to the destination folder (Desktop in our case).

terminal recover deleted files

As shown in the screenshot, I was able to open the Trash folder using the cd .Trash command, but the ls command did not list the files, and the mv command failed to move the file, returning errors. This method may have worked in earlier macOS versions, but it doesn’t seem to work now. The bottom line is that this solution is currently ineffective. However, you can still recover emptied trash on Mac using the guide provided in the first section of this article.

Restore deleted emails from the Mail

If the lost file you want to restore is email, use this instruction. 

The first place to check is the Trash folder in your email account.

Note that deleted emails are only stored in the Trash folder for a limited time, typically around thirty days, depending on your email service provider.

Here’s how to recover deleted emails on a Mac from the Trash folder:

  1. Open the Mail app.
  2. Select Trash from the sidebar on the left.
  3. Browse the deleted emails to find the one you need.
  4. Right-click the email you want to recover and choose Move to from the drop-down menu.
  5. Select the preferred location for the email.

This method also works if you access your email account via a browser. Just find the Trash folder in the sidebar and recover the email you need.

Explore AutoSave and similar built-in backups

If you’ve lost data while working with popular heavy-duty apps like Photoshop, Word, or Excel, you might be able to utilize the option of autosave. This built-in tool usually creates a copy of your file automatically, allowing you to always have the freshest version of your file even if you did not manually save it.

Here what AutoSave looks like in Excel:

excel autosave on

You do need to turn it on in advance though (at least for Excel).

Apps like OneDrive, Dropbox, and Google Drive have version history for their files, so if you’ve lost some data, you can try to browse your file versions to see if there’s something you can salvage there.

How to protect your data in the future

Now that you know how to restore deleted files on Mac, you probably realize that some data might be lost without the possibility of retrieval or you want a more convenient way to keep track of your most important files and folders without worrying about possibly losing something.

One option is to create Time Machine backups to keep all your important info on an external hard drive. And for times when you want to have versions of files without having to connect an external drive, you can choose to backup your data to cloud storages, like Dropbox, OneDrive, iCloud, etc.

You can use tools like Dropshare to easily move any important files to an online storage:

dropshare backup

The app is as simple as setting up the drive you want to sync to and then dragging and dropping any file or item you need synced onto the app’s icon in the Menu bar.

As for the apps we talked about earlier, Get Backup Pro and ChronoSync Express are also great choices to facilitate scheduled backups and help protect any of your important data in the future.

How to recover lost files on Mac: Final thoughts 

No matter how hard you try, it’s almost impossible to never delete a file on your Mac by mistake. 

When you realize that you have emptied the Trash after having deleted something, it can seem hopeless. Good news! Even if files have been permanently deleted from the Trash Bin, Disk Drill can still recover lost files. You can get Disk Drill on Setapp, along with other apps mentioned in this article (Get Backup Pro, ChronoSync Express, Spark Mail, and Dropshare). 

Finally, don’t forget to back up your files, as this is one of the best ways to ensure that your files are never permanently lost. 


Where do deleted files go in Mac?

When you delete a file on a Mac, it is moved to the Trash folder. The file remains in the Trash until you empty it, so you can restore it if necessary. To restore a file from the Trash, simply open the Trash folder, right-click the file, and choose Put Back.

Can you recover deleted files on Mac without Time Machine?

Yes, you can recover deleted files on a Mac without using Time Machine. If the files are still in the Trash, you can restore them directly from there. If they are not in the Trash, you can use the Undo command if you just deleted them. Also, you can try Disk Drill, a tool that brings back every deleted file – instantly. Whatever the reason for data loss, you’ll have it all back in minutes.

Can permanently deleted photos be recovered?

Recovering permanently deleted photos can be a challenge. If you have emptied the Recycle Bin or deleted photos from the Recently Deleted album, your best chance is to use data recovery software.

Are there any built-in Mac features for recovering deleted files?

macOS has several built-in features for recovering deleted files. These include the Trash folder, the Recently Deleted folder in applications such as Photos and Notes, and the Undo (Command + Z) command for instant deletions. In addition, Time Machine is a powerful built-in backup solution that can help you recover older versions of files or files that have been permanently deleted.

Can I recover files without using third-party software

Yes, you can often recover files without using third-party software. Start by checking the Recycle Bin and Recently Deleted folders in various applications. If you just deleted the file, use the Undo command. If you have a Time Machine backup, you can recover files from it. However, files that cannot be recovered using these methods may require third-party data recovery software.

250+ apps for $9.99
per month

Sign up to Setapp and try them for free.