How to recover deleted files on Mac
A deleted file on a Mac is usually still in the Trash: click the Trash icon at the end of the Dock, select the file and choose File › Put Back. If the Trash has been emptied, the file can still come back from an app's Recently Deleted list, from iCloud.com within 30 days, or from a Time Machine backup. This guide goes through those places in the order worth checking them, and shows how to make sure the file was deleted at all and not just moved.
1. Undo, then look in the Trash
If you deleted the file a moment ago and have done nothing in Finder since, press ⌘ Z in Finder. The file goes back where it was.
Otherwise:
- Click the Trash icon at the end of the Dock.
- Find the file. The search field in the window helps when the list is long.
- Select it and choose File › Put Back, or Control-click it and choose Put Back.
Put Back returns the file to the folder it was deleted from. A file deleted from a USB or external drive shows in the Trash only while that drive is connected, so plug the drive in first. Where to find the Trash on Mac covers the Trash in detail, including the hidden folders behind it.
Two things empty the Trash without you doing it: the Finder setting Remove items from the Trash after 30 days (Finder › Settings › Advanced), and iCloud Drive, whose deleted files leave the Trash after 30 days. If the file is older than that, go on to the next sections.
2. Check that the file was really deleted
Many "deleted" files were moved, renamed or saved to a different folder. Before you reach for a backup, search for the file by name:
- Spotlight: press ⌘ Space and type part of the name.
- Finder: press ⌘ F, choose This Mac, type the name and pick Name matches: … from the suggestions.
- Recents: the Recents item in the Finder sidebar lists files you opened lately, wherever they are now.
If you downloaded the file or received it by email, the original may still be in the Downloads folder. For more ways to search, see how to find files on Mac.
3. Recently Deleted in apps
Photos and notes never go to the Trash. The apps keep their own list of deleted items:
- Photos: open Photos and click Recently Deleted below Utilities in the sidebar. If the album is locked, click View Album and follow the instructions to unlock it. Select the photos or videos and click Recover. Items stay there for 30 days and are then permanently deleted.
- Notes: open Notes, click Recently Deleted in the sidebar, and drag the note to another folder. Notes can be recovered for up to 30 days. The folder appears for iCloud notes and notes stored on the Mac; notes on other accounts are removed for good when you delete them.
Voice Memos has a Recently Deleted list of its own; see where voice memos are stored on Mac. For the library behind the Photos app, see where photos are stored on Mac.
4. iCloud Drive files: iCloud.com
A file that was in iCloud Drive has a second safety net, even after the Trash on the Mac is empty:
- Go to icloud.com/iclouddrive and sign in.
- Select Recently Deleted in the sidebar.
- Select the files and choose Recover, or choose Recover All.
For files deleted from other apps that store data in iCloud, go to icloud.com/recovery, select Restore Files, select the files and select Restore Files again. Both lists cover the last 30 days, and recovered files return to the folders they were in. Files you permanently removed on iCloud.com cannot be recovered.
5. Time Machine
If Time Machine was set up before the file was deleted (System Settings › General › Time Machine), it is the way back after the Trash is emptied:
- Connect the backup disk if it is not connected.
- In Finder, open the folder the file was in, for example Documents. For a file that was on the desktop, no window is needed.
- Press ⌘ Space, type
Time Machineand press Return to open it. - Use the arrows next to the window, or the timeline at the right edge of the screen, to go back to a time when the file was still there.
- Select the file or folder and click Restore. It returns to its original location.
Time Machine can sometimes help without the backup disk. According to Apple, it saves a local snapshot of the startup disk about every hour and keeps each one for 24 hours, and it uses those snapshots when the backup disk is not available. So a file deleted earlier today may be restorable even when the disk is in a drawer. A Mac that never had Time Machine turned on has no backups to browse.
6. An earlier version of a document
When the file is still there but its contents were deleted or overwritten, you need an older version, not the Trash. In many apps, including Pages, Numbers, Preview and TextEdit:
- Open the document.
- Choose File › Revert To › Browse All Versions.
- Click the tick marks on the timeline to find the version you want.
- Click Restore, or hold ⌥ Option and click Restore a Copy to keep the current version as well.
Word and Excel work differently; see how to recover an unsaved Word document on Mac.
7. Terminal
These commands only read. They show what there is to recover from:
# what is in your Trash, hidden items included
ls -la ~/.Trash
# files with "budget" in the name that Spotlight knows about
mdfind -name budget
# dates of the local Time Machine snapshots on this Mac
tmutil listlocalsnapshotdates /
"Operation not permitted" on the first command means macOS is keeping the Terminal out of the Trash; use the Trash window instead. Do not try to restore by moving files out of ~/.Trash by hand when Put Back is available: Put Back knows the original folder and a manual move does not.
8. Find the file, or another copy, with Everything Locator
Everything Locator (free to try) is a file name search, not a recovery tool: it cannot bring back a file that is gone from the disk. What it does is answer the question from section 2 in a second, across your home folder, iCloud Drive and the external drives you add, so you know whether there is anything to recover. Often the file turns up in another folder, or an older copy sits on a drive.
| Search | Finds |
|---|---|
budget ext:xlsx;numbers | every spreadsheet with "budget" in its name, with its folder in the Path column |
doc: dm:lastweek | documents changed last week, for when you remember the day but not the name |
~/Downloads/ budget | the copy you originally downloaded |
/Volumes/ budget | copies on external drives you added |
/.Trash/ budget | the file in your Trash or the iCloud Drive trash |
budget !/.Trash/ | copies that are not in the Trash |
The Trash searches need hidden files in the index, because the Trash is a hidden folder: open Settings › Indexing, tick Index hidden files and folders and choose Apply and Rebuild Index. macOS protects the Trash folders, so if the Trash window lists a file that a search does not, trust the Trash window, and use it for Put Back. Press ⌘ Return to show any result in Finder and Space to preview it. The search is by name and path; content:, which asks Spotlight for a word inside files, may miss files in the Trash, a hidden folder that Spotlight usually skips.
FAQ
How do I find deleted files on a Mac?
Open the Trash from the end of the Dock. Photos and notes are in Recently Deleted inside their own apps, and iCloud Drive files are also listed under Recently Deleted on icloud.com for 30 days.
Can I recover files after emptying the Trash?
Not from the Trash itself. Use Time Machine if it was set up, check icloud.com for iCloud Drive files, and look for another copy in Downloads, in email attachments or on an external drive.
Can I recover deleted files without Time Machine?
Only from the places above: the Trash, an app's Recently Deleted list, iCloud.com, or a copy stored somewhere else. macOS has no built-in way to bring back a file that was emptied from the Trash and never backed up. Third-party recovery utilities exist, but none can promise a result, so do not count on them.
How long do I have to recover a deleted file?
In the Trash, until it is emptied. In Photos, Notes and on icloud.com, 30 days. In Time Machine, for as long as the backup disk still holds a backup from before the deletion.
I pressed ⌘ ⌫ on the wrong file. What now?
Press ⌘ Z straight away in the same app. In Finder, and in Everything Locator, that undoes the move to the Trash.
Check whether the file is really gone
Everything Locator finds every file with that name on your Mac and the drives you add, as you type.