Deleting the wrong file happens to everyone, and the good news is that you can often recover deleted files on a Mac if you act quickly. Whether you pressed delete by mistake, emptied the Trash too soon, or lost a photo, there are several ways to get it back, starting with the easiest and ending with last-resort options. This guide walks through five methods in the right order, explains why speed matters, and shows how to protect yourself next time.
Quick answer: where to look first
- Undo the deletion by pressing Command + Z right after you delete.
- Check the Trash and use Put Back.
- Check app-specific folders, such as Recently Deleted in Photos, or iCloud Drive’s recovery page.
- Restore from Time Machine if you have a backup.
- Use recovery software only as a last resort.
Start at step 1 and move down the list only when a method does not work. Most lost files are found in the first three.
Method 1: Undo the deletion
If you deleted a file a moment ago, you may not need any tools at all. In Finder, choose Edit > Undo Move from the menu bar, or press Command + Z. The file jumps back to the folder it came from. This only works right after the deletion, before you do much else in Finder.
Method 2: Restore from the Trash
When you delete a file normally, your Mac moves it to the Trash. It stays there until the Trash is emptied.
How to use Put Back
- Click the Trash icon in the Dock.
- Find the file. You can sort by Date Added or use the search box to find it faster.
- Right-click (or Control-click) the file and choose Put Back.
The file returns to its original location. If Put Back does not appear, drag the file out of the Trash onto your desktop instead.
The 30-day Trash setting
Your Mac can also empty the Trash by itself. In Finder, open Finder > Settings > Advanced and look for Remove items from the Trash after 30 days. If this is on, files are deleted for good after 30 days. If it is off, they stay in the Trash until you empty it yourself. If you are not sure which applies to you, check the setting now, because it changes how long you have to find a file.
Method 3: Check app-specific recovery folders
Some apps and services keep their own recovery area, separate from the Trash.
Photos: Recently Deleted
- Open the Photos app.
- Click Recently Deleted in the sidebar. You may need your password or Touch ID.
- Right-click the photo or video and choose Recover.
Photos keeps deleted items here for around 30 days before removing them for good, so check early.
iCloud Drive: Recover files
Files deleted from iCloud Drive usually do not end up in your Mac’s local Trash. Sign in at icloud.com and open the Data Recovery tools to restore recently deleted files. Do this soon after deleting, because cloud copies are only kept for a limited time.
Other apps
Many apps, including note-taking, mail and document apps, have their own Trash or Recently Deleted area. If you lost a note, an email or a document inside an app, look in that app before you try anything more advanced.
Method 4: Restore from a Time Machine backup
If you set up Time Machine before the file was deleted, you can go back to an older copy, even if the Trash was emptied long ago. If you have not set it up yet, follow our guide on how to back up your Mac with Time Machine so you are ready next time.
- Connect your Time Machine backup drive.
- Open the folder where the file used to live.
- Click the Time Machine icon in the menu bar and choose Browse Time Machine Backups.
- Use the timeline to go back to a date before you deleted the file.
- Select the file and click Restore.
You can also reach restore options from System Settings > General > Time Machine. Apple explains the full process on the Time Machine support page. If your backup is encrypted, you will need your backup password.
Method 5: Use data recovery software (last resort)
If the file is not in the Trash, not in an app, and not in a backup, special recovery programs may still find leftover data on your drive. They scan the disk for traces of deleted files.
What to know before you try
- Act fast. Modern Macs use SSD storage, which can clear deleted data faster than old hard drives. The longer you keep using the Mac, the smaller the chance of recovery.
- Stop saving new files. New data can overwrite the space where your deleted file used to be.
- Do not install the program on the same disk. If you can, run it from another drive, or recover files to an external drive.
- Be careful about what you download. Some fake “recovery tools” are really malware. Only download from the developer’s official website, and read independent reviews. Our guide on fixing the macOS “can’t verify” malware warning explains how to handle suspicious apps safely.
- Know the limits. Recovery software does not guarantee results, and on some Macs, features such as disk encryption and SSD maintenance make recovery harder or impossible.
If the files are truly valuable, such as legal papers or irreplaceable photos, a professional data recovery service is safer than trying many tools yourself.
Which method works when?
| Situation | Best method | Chance of success |
|---|---|---|
| Just deleted a file | Command + Z or Put Back | Very high |
| File still in the Trash | Put Back | Very high |
| Photo deleted recently | Photos > Recently Deleted | High, within about 30 days |
| Deleted file from iCloud Drive | iCloud recovery on icloud.com | High if recent |
| Trash emptied, you have a backup | Time Machine | High |
| Trash emptied, no backup | Recovery software | Uncertain |
How to avoid losing files again
- Turn on Time Machine and leave the backup drive connected.
- Think before you empty the Trash. Take a quick look at what is inside first.
- Use iCloud Drive carefully. Syncing is not the same as backing up, because a deletion can sync everywhere.
- Keep your Mac healthy. Software problems, such as those in our guide to a Mac running slow after an update, can sometimes lead people to delete files in a hurry.
- Keep macOS updated and avoid pirated software, which is a common source of malware that damages files.
What not to do right after deleting a file
- Do not keep downloading or installing things. New data may overwrite the space your deleted file used to take up.
- Do not empty the Trash again until you are sure you have everything you need.
- Do not run random “cleaner” tools. They can delete leftover data that recovery depends on.
- Do not reformat or reinstall macOS before you have tried to recover the file.
Other places to check before you give up
Sometimes a file is not deleted at all, only misplaced or saved under a different name. Before you try anything advanced, spend a minute on these checks:
- Spotlight search. Press Command + Space and type part of the file name, or a word from inside the document.
- The Downloads and Desktop folders, where many apps save files by default.
- Email and chat attachments. If you sent or received the file, a copy may still be in Mail or a messaging app.
- Another user account. If your Mac has more than one account, the file may have been saved under a different one.
- Autosave versions. Some apps keep earlier versions of a document. Look in the app’s File menu for a version history or revert option.
Frequently Asked Questions
Can I recover files after emptying the Trash on a Mac?
Yes, in some cases. If you have a Time Machine backup, restore from it. Without a backup, recovery software may find the file, but success is not guaranteed.
How long do deleted files stay in the Mac Trash?
Files stay in the Trash until it is emptied. If the option Remove items from the Trash after 30 days is on in Finder settings, your Mac removes them automatically after 30 days.
Where do permanently deleted files go on a Mac?
When the Trash is emptied, the Mac marks the space as available. The data may still exist for a short time until new files overwrite it, which is why recovery software can sometimes find it.
Can I recover deleted photos on my Mac?
Open the Photos app, click Recently Deleted, and use Recover. Deleted photos usually stay there for about 30 days.
Is data recovery software safe to use?
It can be, if you download it from the official developer website. Avoid unknown download sites and cracked versions, because some fake tools contain malware.
Conclusion
To recover deleted files on a Mac, start with the simplest options: press Command + Z, check the Trash, and look in Photos or iCloud. If those fail, restore the file from a Time Machine backup. Use recovery software only when nothing else works, and stop using the Mac heavily until you have tried. The best fix is prevention, so set up a regular backup today and you will rarely need these steps again.