How to Recover Overwritten Files on a Mac: Best Methods

Jeffrey Cochin
Macgasm
Published in
12 min readJul 26, 2024

Accidental overwriting of important files on a Mac is a common issue that affects many users, particularly when they manage multiple files or work at a fast pace. Thankfully, several reliable methods exist to restore overwritten files on your Mac. This guide presents step-by-step solutions to retrieve overwritten files. It covers built-in features, cloud backups, local backups, and data recovery software. These approaches will help you recover your important files effortlessly.

Can Overwritten Files Be Recovered?

Recovery of an overwritten file on a Mac is a complex process, and success varies depending on several factors. Here are the key scenarios and considerations:

  • If a file was deleted and new data was written to the same device, there is a chance the new data did not completely overwrite the old file. In such cases, data recovery software might still find fragments of the old file, making partial recovery possible.
  • For files such as Word documents or Photoshop PSD files, all changes are often saved in a single version. In these instances, if the file gets overwritten, there are no alternative versions to restore, even with data recovery software. This underscores the importance of maintaining regular backups.

When using data recovery software to recover overwritten files, it’s important to manage expectations. The chances of recovering fully functional files are low if the data has been overwritten. However, partial recovery is sometimes possible if the overwriting process didn’t completely erase the original data.

Given the challenges of recovering overwritten files, maintaining regular backups is vital. In the next sections, we will show you how to set up these backups to guarantee your data remains safe and easily recoverable.

How to Restore Overwritten File on Mac Utilizing Built-In Features

First of all, we will consider all possible recovery methods using backups. These methods include utilizing built-in backup features in applications, cloud backup services, and local backups like Time Machine. Leveraging the tools and features already available on your Mac allows you to recover important files without needing specialized software. Below, we explore the most effective methods, starting with in-app recovery features in applications like Apple Pages and Numbers. These built-in features provide the best chance at recovering overwritten versions of your files.

Method 1: Retrieve an Overwritten File on Mac Using In-App Features

Many apps automatically save versions of documents as you work on them. A version is saved automatically every hour, or more frequently when you’re making many changes. A version is also saved when you open, save, duplicate, rename, or revert a document. You can browse through document versions at any time and go back to an older version.

Popular applications like Apple Pages and Numbers offer built-in recovery options to revert to previous versions of your files. These features make it easy to recover overwritten files directly within the app without needing external tools.

Here is a step-by-step guide on how to retrieve overwritten files with built-in recovery options:

1. Open the overwritten file in the application. Launch Pages or Numbers from your Applications folder or Dock. Use the Open option from the File menu or double-click the file in Finder to open it.

2. Go to the File menu located at the top of your screen. Click on File in the menu bar to reveal a dropdown menu with various options.

File menu on Mac

3. Select the Revert To option from the dropdown menu. Hover over Revert To to see more options related to file version history.

4. Click “Browse all versions” to view the file’s version history. A new interface will appear, displaying all available versions of the file in a timeline format.

View all versions of the file

5. Browse through the available versions until you locate the one you want to restore. Use the arrows or scroll through the timeline to navigate between different versions. Click on any version to preview its contents in the main window.

6. Click the Restore button to revert to the selected version. After identifying the desired version, click Restore to replace the current file with the selected version. Confirm any prompts that ask if you are sure about restoring the version.

Method 2: Restore Overwritten Files from Cloud Backups

Cloud services like iCloud and Google Drive offer reliable options to recover overwritten files. These services maintain version histories of your files, allowing you to revert to previous versions even after overwriting. Using cloud backups provides a convenient way to recover overwritten files without relying on local storage. These services provide access to previous versions of your files from any device, making file recovery straightforward and efficient. Below, we explain how to use iCloud and Google Drive to recover your files.

Here is a step-by-step guide on how to recover overwritten files in iCloud:

1. Log in to iCloud.com using your Apple ID credentials.

2. Navigate to Settings and select Data Recovery.

Select Data recovery in settings

3. Click Restore Files to view the available versions of your files.

4. Locate the files you want to recover and check the boxes next to them.

Select the files for recovery

5. Click Restore to revert to the selected versions.

Here is a step-by-step guide on how to recover overwritten files in Google Drive:

1. Log in to drive.google.com with your Google account.

2. Find the file you want to revert by browsing or using the search function.

3. Open the file and click on Version History from the menu.

Open Version History in menu

4. Choose the version you want to restore from the list.

5. Click Restore to revert to the selected version.

Method 3: Restore Overwritten Files from Local Backups with Time Machine

Time Machine, a built-in backup feature in macOS, allows you to restore overwritten files easily. By regularly backing up your data, Time Machine provides a straightforward way to revert to previous versions of files. Time Machine is not activated by default; you must set it up to start creating backups. Once activated, Time Machine automatically backs up your Mac every hour, retaining hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for all previous months.

Here is a step-by-step guide on how to recover overwritten files using Time Machine:

1. Connect your Time Machine backup drive to your Mac.

2. Open Finder and navigate to the folder containing the overwritten file.

3. Click the Time Machine icon in the menu bar and select Enter Time Machine.

Use Time Machine to restore files

4. Use the timeline on the right side of the screen to find the backup made before the file was overwritten.

5. Browse through the available backups and select the file you want to restore.

6. Click Restore to revert to the selected version of the file.

How to Recover Deleted Overwritten Files on Mac with Recovery Software

Data recovery software can help recover deleted overwritten files by scanning your hard drive for remnants of the original files. This approach is particularly useful when all other options have failed, and your important files seem to be gone for good. Here, we concentrate on two specific software options: Disk Drill and PhotoRec. These tools offer solutions to recover overwritten files efficiently.

Option 1: Disk Drill

Disk Drill is a powerful data recovery tool that supports Mac users in retrieving lost files. It can recover around 400 types of files, including documents, photos, videos, audio files, and more. The software uses advanced scanning algorithms to locate and restore deleted or overwritten files from your hard drive and other storage devices. Disk Drill offers an intuitive and easy-to-use interface, making it accessible for users of all skill levels. The step-by-step recovery process guides you through the necessary actions to retrieve your files.

Disk Drill’s free version allows users to preview files before recovery. However, to actually recover the files, you need to upgrade to the Pro version, which unlocks additional features and unlimited recovery.

Here is a step-by-step guide on how to use Disk Drill to recover deleted overwritten files:

1. Download and install Disk Drill from the official website.

2. Open the app and grant the necessary permissions for full disk access.

3. Select the drive to scan for lost data and click Search for lost data.

Select the drive with overwritten data

4. Wait for the scan to complete. This process may take several minutes, depending on the drive’s size.

Scanning the drive

5. Review the found items. Disk Drill categorizes the files it finds, making it easier to locate specific file types.

Review the files

6. Locate your file and click Recover. Disk Drill allows you to preview files before recovery to make sure you recover the correct items.

Recover overwritten files

7. Choose a recovery location that differs from the original location to avoid data corruption.

Option 2: PhotoRec

PhotoRec is an open-source data recovery software designed to recover lost files from various storage devices. It supports a wide range of file formats, making it a versatile tool for recovering documents, photos, videos, and more. PhotoRec’s interface is text-based and operates through the command line, which may be less user-friendly compared to Disk Drill’s graphical interface.

PhotoRec works by ignoring the file system and going after the underlying data. This approach enables it to recover files even if the file system is severely damaged or reformatted. The software is highly regarded for its effectiveness and reliability in data recovery tasks.

Here is a step-by-step guide on how to use PhotoRec to recover overwritten files on Mac using Terminal:

1. Download and install PhotoRec from the official website. The software comes bundled with TestDisk, another useful recovery tool.

2. Open Terminal on your Mac. You can find Terminal in the Utilities folder within Applications.

3. Navigate to the directory where you installed PhotoRec. Use the cd command to change directories.

Navigate to the directory with Photorec

4. Run PhotoRec with administrative privileges by typing sudo ./photorec. Enter your password when prompted.

5. Select the drive or partition you want to scan for lost data. Use the arrow keys to navigate and press Enter to select.

Navigate to the directory for scan

6. Choose the file formats you want to recover. PhotoRec allows you to specify the types of files to search for, which can speed up the recovery process. You can enable or disable specific file formats by navigating the options.

7. Select the file system type. Usually, PhotoRec can detect this automatically, but you can specify it manually if needed.

Select the file system type

8. Start the scanning process by selecting the appropriate options. PhotoRec will begin scanning the selected drive or partition for recoverable files.

Start the scanning process

9. Wait for the scan to complete. This process may take some time, depending on the size of the drive and the number of files.

10. Review the recovered files. PhotoRec saves the recovered files in the directory from which you run the program by default, but you can specify a different location.

11. Save the recovered files to a new location different from the original to prevent data corruption.

How to Prevent Overwritten File Loss with Backups on Your Mac

Prevention of file loss due to overwriting begins with regular backups. If you haven’t activated backups yet, this section will show you how to set up Time Machine and iCloud backups easily. By doing this, you guarantee your data remains safe and easily recoverable. Regular backups protect against accidental overwriting, deletion, and other data loss scenarios.

Additionally, it’s worth remembering that many programs that work with files have built-in backup tools that are flexible and do not require an additional disk. These tools should be used to avoid data loss.

How to Set Up Time Machine Backups

Time Machine is a great macOS feature that automatically backs up your entire system, including apps, music, photos, emails, and documents. If you still don’t have backups activated, follow these steps to set up Time Machine:

1. Connect an external hard drive to your Mac.

2. Open System Settings from the Apple menu.

Open System Settings

3. Select Time Machine from the list of options.

Select Time Machine

4. Click “Add Backup Disk” and choose the connected external drive as the backup destination.

Add Backup Disk

5. Toggle the Time Machine switch to On. Time Machine will start creating automatic backups.

6. You can exclude specific folders from the backup or change the backup frequency in the Time Machine preferences.

Set up the backup

How to Set Up iCloud Backups

iCloud offers an additional layer of protection by backing up your files to Apple’s cloud storage. If you don’t have backups activated, follow these steps to set up iCloud backups:

1. Open System Preferences and click Apple ID.

2. Select iCloud from the sidebar.

Select iCloud

3. Click on “Options” next to iCloud Drive and select the folders and apps you want to back up.

4. This will automatically sync your files to iCloud. You can check the backup status and available storage in the iCloud preferences.

Conclusion

You can recover overwritten files on your Mac using various methods. We discussed using built-in app recovery features and backups. Overwritten files may seem lost, but tools like Disk Drill and PhotoRec can scan deeply to recover them. Regular backups with Time Machine and iCloud prevent data loss and simplify recovery. Act quickly to increase your chances of successful recovery. Always maintain regular backups to protect your important files.

FAQ

Can an overwritten file be recovered on a Mac?

Yes, but the success varies. If new data hasn’t completely overwritten the old file, partial recovery might be possible using data recovery software. Regular backups with Time Machine, iCloud, and built-in app recovery features are critical to avoid data loss and increase recovery chances.

How do I use Terminal to recover overwritten files on a Mac?

Using Terminal, you can run PhotoRec to recover overwritten files. Download and install PhotoRec, open Terminal, navigate to the PhotoRec directory, and run the program with administrative privileges. Follow the prompts to select the drive, file formats, and start the recovery process.

Is it possible to recover overwritten files without Time Machine?

Yes, you can recover overwritten files without Time Machine by using built-in app recovery features, cloud backups (like iCloud or Google Drive), or data recovery software such as Disk Drill and PhotoRec.

How do I recover an overwritten folder on a Mac?

To recover an overwritten folder on a Mac, you can use Time Machine or data recovery software like Disk Drill and PhotoRec. With Time Machine, navigate to the folder in Finder, enter Time Machine, locate the folder from a previous backup, and click Restore. With Disk Drill or PhotoRec, scan the drive where the folder was located, and follow the recovery steps to restore the entire folder.

How do I prevent files from being overwritten?

Regularly back up your data using Time Machine and iCloud. These backups guarantee you have multiple versions of your files, making it easier to revert to a previous version if needed. Additionally, be cautious when saving new files and use descriptive file names to avoid accidental overwrites.

What should I do immediately after overwriting a file?

Act quickly to increase the chances of recovery. Avoid using the Mac as much as possible to prevent new data from overwriting the space where your lost file resides. Use one of the recovery methods mentioned in this guide to restore your overwritten file.

--

--

Jeffrey Cochin
Macgasm
Editor for

Tech Expert with 20 Years Experience. Specializing in Computer Error Fixes.