Most of us have experienced that sinking feeling at one time or another. You save a file, see a message saying there is already a file with the same name in that location and continue anyway, only to realize seconds later that you have overwritten a file you really needed. Or perhaps you drag a file in the Finder from one folder to another and see the message, but only afterwards realize you’ve made a big mistake. At that moment, the only thought in your mind is how to recover overwritten files on your Mac. Well, that’s the question we’re going to answer in this article. The good news is, all is not lost, there are several ways to do it.
What happens when you overwrite a file on Mac?
Many Mac users think that when they overwrite a file on their Mac, the data from the new file takes the place of the data from the old file, like rubbing out chalk writing on a blackboard and writing something else. That’s not the case. The old file’s data remains intact. What changes is the file index — your Mac replaces the old file's entry with the new one in its file directory. The old file is invisible and not retrievable through normal methods, but it is still there.
How to maximize your chances of recovering files
The most important thing to remember when you overwrite a file is to avoid using your Mac until you’ve recovered it. The more you write to the disk, the less likely you are to recover the file.
Another way to improve your chances is to prepare your Mac in advance — clear out junk and clutter, check for malware, and run maintenance tasks like repairing permissions, reindexing Spotlight, and thinning Time Machine snapshots. Doing all that yourself is time-consuming and not much fun. But luckily, you don’t have to.

CleanMyMac’s Smart Care feature can do it for you. It scans your Mac looking for all that junk and clutter, checking for malware and maintenance that needs to be done. You can then choose which recommendations to follow with a couple of clicks. In just a few minutes, your Mac will be in great shape and free from clutter. Start your free CleanMyMac trial.
How to recover overwritten files on Mac
Use Time Machine
The easiest way to recover overwritten files is to use Time Machine or another backup application. That, of course, only works if you back up your Mac regularly. If you use Time Machine to back up your Mac, here’s how to recover an overwritten file.
- Click the Time Machine icon in the menu bar.
- Choose Browse Time Machine Backups.
- Use the arrows at the side of the Finder window to navigate to the last backup before you overwrote the file.
- Navigate to the file and select it.
- Click Recover.
Recover files in iCloud
If the file you have overwritten was saved to iCloud, you may be able to recover it using the recovery feature in iCloud Drive on the web.
- Go to icloud.com and log in.
- If you have Advanced Data Protection switched on, you will need to turn on web access on your Mac or another device. Click Manage on Device. Tap the notification that appears on your Mac or another device, and follow the on-screen instructions to enable access.
- In the browser window, click Continue on iCloud.com
- Choose Data Recovery at the bottom of the window. Then click Restore Files.
- If you are using Advanced Data Protection, you will see another message telling you that you need to enable access. Click the notification and follow the instructions to do that.
- You will see a list of files that can be recovered. Select the file you overwrote and click Restore.

Recover an earlier version of a file
In this scenario, you are working on a file in an app like, say, Pages or Numbers, and you make changes to the file. That file is then automatically saved, and the new file overwrites the old one. Here’s how to recover the overwritten file.
- With the amended file open in the application, click the File menu.
- Go to Revert to and choose either:
Last opened, to return the file to the state it was in when you last opened it; or
Browse to see all versions of the file. - If you choose Browse all versions, you will see a Time Machine-style interface.
- Use the arrows to navigate to the version you want.
- Click Restore.
Some apps, like Word, have their own version of this process. If they support recovery, there should be an option like ‘Browse Version History’ in the File menu. In Word, the different versions are then shown in a sidebar, and you can click Open Version to recover them.
Use data recovery software
If none of the options above work for you, the final option is to use a specialist data recovery app. These tools are designed to recover files that have been trashed or overwritten. They scan your Mac looking for deleted files and then, if they are still intact, allow you to recover them.
It’s a horrible feeling: you save a file and then realize that you’ve overwritten a file you really needed. What do you do? How do you get it back? Don’t panic, there are lots of options. Follow the steps above to recover overwritten files on your Mac.