How to Recover Deleted TXT File on Mac (7 Proven Methods)

Christina
Written byChristinaUpdated on Jun 20, 2025
Gerhard Chou
Approved byGerhard Chou

Table of Contents

Before we start: The deleted TXT file is not lost for good even you've emptied the trash bin on the Mac. With data recovery software - such as Donemax Data Recovery for Mac, you can easily and securely recover a deleted TXT file from Mac's internal disk, external HDD, SSD, USB flash drive, SD card, etc. It also can help export inaccessible TXT files from a corrupted drive to your Mac.

 

 Download

Mac Data Recovery

Rate: 4.8

     

PAGE CONTENT:

Accidentally deleting an important TXT file on your Mac can be frustrating - especially if it contains crucial notes, scripts, logs, or documentation. Whether you deleted it by mistake, emptied the Trash too soon, or lost it during a system crash or power outage, don't panic. In most cases, deleted files can still be recovered - if you act quickly and use the right approach.

In this guide, we'll explore 7 proven methods to help you recover deleted .txt files on macOS, ranging from simple Trash recovery to advanced data recovery software and cloud backups.

recover deleted txt file on Mac

7 Methods to Recover Deleted or Lost TXT Files on Mac

Method 1. Check the Trash Bin for Deleted Text Files

Why It Works:

When you delete a txt file on macOS, it's usually moved to the Trash instead of being permanently deleted. This is your first line of defense.

Steps to Recover from Trash:

Step 1. Click the Trash icon in your Dock.

Click the Trash icon in your Dock

Step 2. Browse through the files or use the Search bar to locate the deleted .txt file.

Step 3. Right-click the file and choose Put Back.

Right-click the file and choose Put Back

This will return the file to its original location.

What If You Emptied the Trash?

If you've emptied the Trash, you'll need to proceed with one of the following methods. Once the Trash is cleared, the file is no longer accessible through the standard user interface.

Method 2. Restore Lost TXT Files from Time Machine Backup

What is Time Machine?

Time Machine is Apple’s built-in backup utility that automatically saves snapshots of your entire system, including documents like .txt files.

How to Recover Using Time Machine:

Step 1. If your Time Machine backup disk is external, connect it.

Step 2. Access the original folder containing the TXT file.

Step 3. Choose Enter Time Machine or Browse Time Machine Backups after clicking the Time Machine symbol in the navigation bar.

Restore Lost TXT Files from Time Machine Backup

Step 4. To access an earlier iteration of the folder, use the timeline slider on the right.

Step 5. Locate the missing .txt file, select it, and click Restore.

Restore Lost TXT Files from Time Machine Backup

Limitations:

  • Only works if Time Machine was already set up.
  • If the file was deleted before your last backup, it may not be recoverable.

Method 3. Check File Versions via Auto Save or "Revert To"

Some Mac applications like TextEdit support Auto Save and version history. Even if you deleted or changed the file, a previous version might be accessible.

How to Use "Revert To":

Step 1. Open TextEdit or the app you used to create the TXT file.

How to Use Revert To

Step 2. Go to File > Revert To > Browse All Versions.

How to Use Revert To

Step 3. Use the timeline interface to view and restore previous versions.

⚠️Note:
This only works for documents saved using apps that support Apple's versioning system and saved on your local drive or iCloud.

Method 4. Recover Deleted TXT Files with Mac Data Recovery Software

If the above methods didn't help, data recovery software can often restore deleted .txt files - especially if you act quickly before the data is overwritten.

Donemax Data Recovery for Mac is a powerful yet easy-to-use data recovery application for macOS. It can easily and quickly recover permanently deleted or lost TXT files on Mac or from external storage device.

Step 1. Download and install Donemax Data Recovery for Mac on your Mac, then run it from Launchpad.

 

 Download

Mac Data Recovery

Rate: 4.8

     

Step 2. Choose the drive where you delete or lose the TXT files. Donemax Data Recovery for Mac supports to recover lost TXT files from local HDD/SSD and external disk, USB flash drive, memory card, etc.

Choose the drive where you delete or lose the TXT files

Step 3. Click on Scan button. Donemax Data Recovery for Mac will deeply scan the selected drive and find all recoverable files including lost TXT files.

Click on Scan button

Step 4. After scanning, you can click Type > Documents > txt to find the lost TXT files.

Find the lost TXT files

Before recovery, you can preview the TXT file.

Preview the TXT file

Step 5. Select the wanted TXT files, click on Recover button to save them.

Click on Recover button to save them

Donemax Data Recovery for Mac allows you to save up to 200MB files for free.

★ Tips for Using Recovery Tool Effectively

  1. Stop using the affected drive immediately.

    Every moment you continue to use the Mac increases the chance of file overwriting.

  2. Use the preview feature before recovery.

    This ensures you're restoring the right version of the file.

  3. Save recovered files to a different drive.

    Always export recovered data to an external or separate drive to avoid conflicts.

★ Final Thoughts on Recovery Tools

While third-party tools aren't always free, they provide one of the best chances to restore deleted .txt files after Trash has been emptied or if you never used Time Machine. 

Pros

  • User-friendly interfaces.
  • Deep scan options can find files deleted long ago.
  • Preview before recovery.

Cons

  • Free versions may limit the amount of data you can recover.
  • Some features may require a paid upgrade.

⚠️Note: If the TXT files are deleted by data erasure software - such as Donemax Data Eraser for Mac, they are lost for good, can't be recovered by any data recovery software.

Method 5. Recover TXT Files from iCloud or Cloud Storage Services

If you had synced your .txt file with iCloud Drive, Dropbox, Google Drive, or other cloud platforms, there's a good chance it's still recoverable.

How to Restore from iCloud:

Step 1. Visit iCloud.com and log in.

Step 2. Go to iCloud Drive.

Step 3. Check for the file or go to Recently Deleted (in the bottom-right corner).

Step 4. Select the file and click Recover.

How to Restore from iCloud

Dropbox, Google Drive, etc.:

  • Go to the Trash/Recycle Bin or Version History on the web version.
  • Restore the file with one click.

Benefits:

  • Cloud services often keep deleted files for 30 days.
  • Some offer file versioning, letting you restore older versions of a file.

Method 6. Use Terminal for TXT File Recovery (for old macOS versions)

For experienced users, Terminal can be used to search for remnants of deleted .txt files.

Try This:

sudo find / -name "*.txt" 2>/dev/null

Or search recently modified files:

sudo find / -mtime -1 -name "*.txt"

You may also try recovering raw data from your drive using tools like PhotoRec (from the TestDisk suite), but this requires more technical skill.

Caution:

  • Misuse of Terminal commands can harm your system.
  • This method is not recommended for beginners.

Method 7. Recover Lost TXT Files from External Backups

If you have cloned your Mac to an external hard drive before the TXT files get lost, you can restore the lost TXT files from the external hard drive backup.

For example, if you've create a bootable clone backup for your Mac with Donemax Disk Clone for Mac, you can quickly restore the lost TXT files from the external hard drive backup.

Just connect the external hard drive to your Mac, open it via Finder. Then find the TXT files, copy them back to your Mac.

Tips to Prevent TXT File Loss on Mac in the Future

After recovering your file, it's a good time to implement some preventative practices to avoid future data loss:

1. Set Up Time Machine:

  • Use an external drive or Time Capsule.
  • Automate hourly, daily, and weekly backups.

2. Use Cloud Syncing:

  • Save .txt files to iCloud Drive, Dropbox, or Google Drive.
  • These services offer both real-time syncing and trash folders for accidental deletions.

3. Enable Auto Save:

  • Use apps that support macOS Auto Save and versioning features.
  • Check your app preferences for save intervals.

4. Manual Backups:

  • Periodically copy important files to USB drives or external SSDs.

5. Install File Recovery Software Now:

Conclusion

Recovering a deleted TXT file on your Mac is usually possible, especially if you act quickly. From simply checking the Trash to using professional-grade recovery tools, there's a method for every situation. If you regularly work with important .txt files - whether for coding, documentation, or notes - setting up backup and versioning strategies can save you future headaches.

Donemax Data Recovery for Mac is a good option for TXT file recovery if you can't restore the deleted TXT file from trash or backups. It can deeply scan the drive and find the lost TXT file. Then you can easily get the deleted TXT file back.

logo stage

Donemax Data Recovery for Mac

Donemax Data Recovery for Mac is one of the best Mac data recovery software. It is easy-to-use and can help in recovering deleted, formatted, inaccessible or lost data from Mac HDD/SSD, external disk, USB drive, SD card, camera or other storage devices.

 

 Download

Mac Data Recovery

Rate: 4.8

     

Christina
Contributing Writer

Christina

Christina is the senior editor of Donemax software who has worked in the company for 4+ years. She mainly writes the guides and solutions about data erasure, data transferring, data recovery and disk cloning to help users get the most out of their Windows and Mac. She likes to travel, enjoy country music and play games in her spare time.

Gerhard Chou
Editor in chief

Gerhard Chou

In order to effectively solve the problems for our customers, every article and troubleshooting solution published on our website has been strictly tested and practiced. Our editors love researching and using computers and testing software, and are willing to help computer users with their problems