How to recover permanently deleted files on Mac from an emptied trash?

Accidentally deleting important files and realizing it only after emptying the Trash is one of the worst feelings for any Mac user. When you delete a file on Mac, it goes to the Trash folder. The files in the Trash remain there until you choose to permanently erase them by emptying the Trash. Once you empty the Trash, those files are generally gone forever.

Or are they? Fortunately, there are ways to recover “permanently” deleted files on Mac, even after emptying the Trash. In this guide, we’ll walk you through the different methods to rescue your lost files on macOS.

Why Files Can Be Recovered After Emptying Trash

When you permanently erase files on Mac by emptying the Trash, the OS simply removes pointers to those files and marks the space they occupied as available. The actual data still remains on the drive until it gets overwritten by new data.

As long as the deleted files are not overwritten, recovery software can scan the drive and retrieve the lost data. But if you continue using the Mac and saving new files, the deleted data will slowly get overwritten. So it’s crucial to stop using the drive immediately and use data recovery software as soon as possible after accidental deletion.

Factors That Affect Recovery of Deleted Files

The chances of recovering deleted files depends on:

  • Time since deletion – The sooner you attempt recovery, the better
  • Disk usage after deletion – Less usage gives higher chances of recovery
  • Type of storage – Files on SSDs are harder to recover as SSDs automatically trim deleted data

With that in mind, let’s look at the possible solutions to recover deleted files from an empty Trash on Mac:

Method 1: Restore from Time Machine Backup

If you have a Time Machine backup, you can easily recover deleted files by restoring them from the backup. Here are the steps:

  1. Connect the Time Machine drive to your Mac
  2. Open Finder and click on Time Machine in the menu bar
  3. Browse and find the files you want to restore in the Time Machine interface
  4. Select the files and click Restore to copy them back to your Mac

This allows you to restore your permanently deleted files in just a few clicks. Time Machine makes regular backups of your Mac, so you can go back to a previous backup version before you deleted the files.

Pros of Using Time Machine:

  • Quick and easy file recovery
  • Allows restoring many deleted files at once
  • Files are exactly as they were when backed up

Cons of Using Time Machine:

  • Need to have Time Machine backup already set up
  • Only works as far back as your oldest backup

Method 2: Scan Storage Device with Data Recovery Software

If you don’t have a backup, the best way to recover deleted files is to use a data recovery program. Here are the main steps:

  1. Select a data recovery app like Disk Drill or Stellar Data Recovery
  2. Install the app on your Mac and launch it
  3. Select the internal drive or external device to scan for lost data
  4. Choose file types you want to recover
  5. Wait for the scan to complete
  6. Preview and restore the found files

A data recovery app scans the raw storage device to find files marked for deletion. This method can rescue data even after emptying the Trash, unless it has been overwritten.

Pros of Data Recovery Software:

  • Recovers data even without backup
  • Advanced scanning for deep file recovery
  • Recovers from formatted drives or corrupted disks
  • Many types supported including documents, photos, video, etc.

Cons of Data Recovery Software:

  • Requires installing an app and scanning takes time
  • Need to purchase full version for recovering all files
  • No guarantee that all deleted files will be found

Method 3: Try Shadow Explorer

Shadow Explorer is a handy utility that can restore deleted files on Mac by leveraging snapshots created by the Volume Shadow Copy Service (VSS).

Here are the steps to recover deleted files using Shadow Explorer:

  1. Download and install Shadow Explorer on your Mac
  2. Launch the app and select the drive to scan
  3. Navigate to the folder where your files were deleted
  4. Shadow Explorer shows snapshots of that folder from earlier times. Browse the snapshot copied to restore files.

This method relies on VSS snapshots of your file system, so it only works on HFS+ and APFS formatted drives.

Pros of Shadow Explorer:

  • Free app that’s easy to use
  • Restores previous versions of files and folders
  • Works even after emptying Trash

Cons of Shadow Explorer:

  • Only recovers files that exist in snapshots
  • Doesn’t work on drives that don’t support VSS
  • Manual process to browse and find deleted files

Method 4: Scan and Recover Deleted Files from Terminal

For advanced users, the Mac terminal provides access to powerful file recovery commands. Here are some options:

Using fsck to Recover Deleted Files

fsck or file system consistency check verifies and repairs directory damage. It can also retrieve orphaned files that exist on disk but aren’t listed in the file table.

  1. Type diskutil list to get disk identifier
  2. Unmount disk with diskutil unmountDisk /dev/diskX (replace X)
  3. Run fsck with sudo fsck_hfs -rp /dev/diskXs1 (replace X and 1)
  4. Deleted files are now in /Volumes/Orphaned Files/

Using lsof to Recover Open Deleted Files

lsof lists open files held by processes. You can use it to find deleted files that were still open and then recover them.

  1. Run sudo lsof > lsof.txt to output a list of open files
  2. Search lsof.txt to find your deleted files marked as (deleted)
  3. Copy out the corresponding /dev/fd/# path
  4. Use cp /dev/fd/# /path/to/recover/file.txt to recover that file

Using debugfs to Find and Copy Deleted Files

debugfs allows directly accessing the filesystem to find and copy inodes mapped to deleted files. Here are the basic steps:

  1. Get image of partition with dd if=/dev/diskX of=partition.img
  2. Run debugfs on image – sudo debugfs -R 'find /deleted_file/inode' partition.img
  3. Note down inode of file
  4. Use debugfs to copy out file from inode

These terminal methods involve directly accessing the file system, so they can be risky. Make sure to have backups before trying these.

Method 5: Seek Professional Data Recovery Service

For business-critical data and complex cases like recovering files from a failing drive, you may need to turn to a professional Mac data recovery service. Examples include:

  • DriveSavers
  • Ontrack
  • Gillware
  • Secure Data Recovery

These dedicated labs have advanced tools and custom recovery methods to obtain hard-to-recover files. But their services can get quite expensive.

Main Pros of Professional Recovery:

  • Highest success rate for all file types
  • Clean room facilities for repairing drives
  • Advanced techniques like disk imaging, data extraction

Main Cons:

  • Very expensive, often $500 to $1000+
  • Takes days for recovery with shipping drives back and forth

So turn to professional recovery only if you exhausted all other options or need urgent business data back.

How to Avoid Needing File Recovery in the Future

Prevention is always better than a cure. Follow these tips to avoid file loss and the need for recovery:

  • Have a solid backup system like Time Machine
  • Enable auto trash emptying after 30 days
  • Double check before emptying trash
  • Install anti-malware to prevent ransomware
  • Handle drives carefully to prevent physical damage
  • Upgrade old drives that may be prone to failure

Adopting these practices will help minimize the risk of file loss and keep your data protected.

Conclusion

While accidentally deleting and losing files can happen to anyone, don’t panic. As we covered, there are several effective methods to recover deleted files on Mac even after emptying the Trash, provided the data hasn’t yet been overwritten.

Your best options are using Time Machine backups or data recovery software. But also consider Shadow Explorer snapshots, terminal commands, and professional recovery services for difficult cases with valuable data loss. Following best practices will also help avoid file deletion and the need for recovery in the first place.

Just make sure to act quickly after any accidental file deletion for the best chance of getting your data back intact and avoid using the drive to prevent overwriting deleted files. With the right tools and know-how, you can minimize the headache and heartbreak of important file loss on macOS.

Leave a Comment