Mac keeps the file you replaced in Trash for 30 days

When you replace a file on Mac — by saving a new version with the same name in the same folder — the original file moves to Trash. You can recover it by opening Trash, finding the file, and moving it back to its original location or somewhere else. This works as long as you have not emptied Trash, which permanently deletes files.

The 30-day window is how long Mac keeps files in Trash before automatically removing them. If you replaced a file more than 30 days ago and have not emptied Trash manually, check Trash first — it may still be there. If Trash is already empty, the original file is gone and cannot be recovered through the Trash method.

Key Takeaways

  • Replaced files go to Trash automatically, where they stay for up to 30 days unless you empty Trash sooner.
  • Open Trash, locate the file by name and date, and drag it back to the folder where it was originally stored.
  • If you cannot find the file in Trash, check whether you emptied Trash or whether the replacement happened more than 30 days ago.
  • Time Machine backups can recover files even after Trash is emptied, if you set up backups before the replacement happened.
  • Renaming the new file instead of replacing the original is the safest way to keep both versions.

How to recover a replaced file from Trash

Click the Finder icon in your dock, then click Trash in the sidebar. If Trash does not appear in the sidebar, go to Finder menu → Settings → Sidebar and check the Trash box.

Look through the files in Trash for the one you replaced. Files in Trash show the date they were moved there, which helps you identify the right one if you have multiple files with the same name. Click the file once to select it, then drag it to the folder where it was originally stored, or drag it to your Desktop as a temporary location while you decide what to do with it.

If you cannot remember the original folder, you can also right-click the file in Trash and choose Open Enclosing Folder — this shows you where the file was before it was deleted. Drag the file back to that same location.

What happens if you already emptied Trash

Once you empty Trash, files are no longer recoverable through the Trash method. However, if you use Time Machine — Mac's built-in backup tool — you may still recover the original file from a backup made before the replacement happened.

To check whether Time Machine is set up, click the Time Machine icon in the menu bar (top right of your screen) and look for "Enter Time Machine" as an option. If you see this option, backups are running. Click it to enter Time Machine, then navigate to the date before you replaced the file. Find the folder where the original file was stored, locate the file, and click Restore.

If Time Machine is not set up or you do not see a backup from before the replacement date, the file cannot be recovered. Third-party data recovery software exists, but success depends on whether the disk space where the file was stored has been overwritten by new data — the longer you wait, the less likely recovery becomes.

Why replacing a file is different from deleting it

When you delete a file by dragging it to Trash or pressing Command-Delete, the file goes to Trash. When you replace a file — by saving a new document with the same name in the same location — the old file also goes to Trash, but the new file takes its place when ready. From the user's perspective, the folder now contains the new version, and the old version is in Trash.

This matters because you might not realize you have replaced a file until later, when you open it and see the new content instead of the old. By then, the original is already in Trash, waiting to be recovered.

How to avoid replacing files by accident

The safest approach is to save the new version with a different name instead of overwriting the original. When you use File → Save As (or press Shift-Command-S), you can type a new name before saving. For example, instead of saving over "Budget 2024", save it as "Budget 2024 v2" or "Budget 2024 revised". Both files then exist in the same folder, and you can open either one.

Another option is to use version control built into some Mac applications. In Pages, Numbers, and Keynote, you can go to File → Duplicate to create a copy with a new name, or use File → Revert To to see older versions of the document if you have been saving it regularly. Microsoft Word and Google Docs also track version history, though the method differs.

For files you edit frequently, create a folder structure that separates drafts from final versions — for example, a "Drafts" folder and a "Final" folder. This makes it harder to accidentally overwrite something important.

Using Spotlight to find files before they disappear

If you think you replaced a file but are not sure, use Spotlight to search for it before checking Trash. Press Command-Space to open Spotlight, type the file name, and look at the results. If the file appears with a recent modification date that matches when you replaced it, that is the new version. If you see an older modification date, that might be the original in Trash.

You can also search Trash directly. Open Trash, then use Command-F to search within it. Type the file name to find all versions of that file in Trash, which helps if you have replaced the same file multiple times.

When recovery is not possible

If Trash is empty, Time Machine is not set up, and more than 30 days have passed since the replacement, the original file cannot be recovered through standard Mac tools. At this point, the only option is third-party data recovery software, which scans your disk for file fragments. These tools are not may provide to work, especially if your Mac has been in heavy use since the replacement — new files may have overwritten the space where the original file was stored.

This is why regular backups matter. If you set up Time Machine now, it protects you against future accidents, but it cannot recover files from before the backup started.

Frequently Asked Questions

Can I undo a file replacement if I already saved over it?

Yes, if Trash still contains the original file. Open Trash, find the file by name and date, and drag it back to its original folder. If you already emptied Trash, check Time Machine. If neither is available, the file is gone.

How long does Mac keep files in Trash?

Mac automatically removes files from Trash after 30 days. You can empty Trash manually at any time, which when ready deletes all files in it. Once Trash is empty, files are not recoverable through Trash.

Does Time Machine back up files that are in Trash?

Yes. Time Machine backs up your entire disk, including Trash. If you need to recover a file that is no longer in Trash, you can use Time Machine to restore it from a backup made before the file was deleted.

What is the difference between Save and Save As on Mac?

Save (Command-S) overwrites the existing file with new changes. Save As (Shift-Command-S) lets you type a new name and location before saving, creating a separate file instead of replacing the original.

Can I recover a file if my Mac crashed right after I replaced it?

Yes. The replaced file goes to Trash even if your Mac crashes when ready after. Restart your Mac, open Trash, and recover the file the same way you would after any replacement.