Undo and Recover
How to undo mistakes, redo actions, and recover deleted files on any computer
Everybody makes mistakes on a computer. The good news is that almost everything can be undone, and most deleted files are not actually gone right away. The undo shortcut works in nearly every app on your computer, and your Trash or Recycle Bin gives you a safety net for deleted files.
Undo:
- Press Cmd + Z to undo your last action
- Keep pressing Cmd + Z to undo multiple actions in a row, stepping back through your recent changes one at a time
- This works in almost every app – text editors, email, file renaming, moving files in Finder, and more
Redo:
- Press Cmd + Shift + Z to redo (reverse an undo)
- This brings back whatever you just undid, so you can go back and forth
Some apps use Cmd + Y for redo instead, but Cmd + Shift + Z is the standard on Mac.
Undo in specific apps:
- Mail: if you send an email, look for the Undo Send notification at the bottom of the screen. You have about 10-30 seconds to cancel it (depending on your settings in Mail > Settings > Composing)
- iMessage: long-press a message you just sent and choose Undo Send (within 2 minutes)
- Safari: Cmd + Z reopens a tab you just closed (same as Cmd + Shift + T)
- Finder: Cmd + Z undoes moving, renaming, or trashing a file
Trash (recovering deleted files):
When you delete a file on Mac, it goes to the Trash – it is not gone yet.
- Click the Trash icon in the Dock (far-right side)
- Find the file you want to recover
- Right-click it and choose Put Back to restore it to its original location
To delete a file to Trash: select it in Finder and press Cmd + Delete.
Emptying the Trash:
To permanently delete everything in the Trash:
- Right-click the Trash icon in the Dock
- Choose Empty Trash
- Confirm when asked
You can also press Cmd + Shift + Delete from Finder to empty the Trash. Once emptied, the files are gone for good from your Mac.
Mac can also automatically empty Trash items older than 30 days. Check this in Finder > Settings > Advanced.
Cloud recovery (if the file was in a cloud folder):
- iCloud Drive: go to icloud.com, sign in, open Drive, and check Recently Deleted. Files stay there for 30 days
- Google Drive: go to drive.google.com, click Trash in the sidebar. Files stay for 30 days
- OneDrive: go to onedrive.com, click Recycle bin in the sidebar. Files stay for up to 30 days
Frequently Asked Questions
Does undo work everywhere?▾
Almost. Ctrl + Z (or Cmd + Z on Mac) works in nearly every app that involves typing or editing – word processors, email, spreadsheets, image editors, and even file managers. A few apps and web forms do not support it, but those are rare. The more you use it, the more you will realize just how many places it works.
Can I recover a file after emptying the Trash or Recycle Bin?▾
It is very difficult. Once you empty the Trash (Mac/Linux) or Recycle Bin (Windows), the files are marked as permanently deleted. If the file was stored in a cloud service like Google Drive, iCloud, or OneDrive, check the trash on that service's website – it keeps deleted files for about 30 days independently. For local files, specialized recovery software sometimes works if you act quickly, but there are no guarantees.
How many times can I undo?▾
It depends on the app. Most text editors, word processors, and design tools support many levels of undo – sometimes hundreds. Simpler apps or web-based tools might only support a few undos. The safest habit is to undo right away when you notice a mistake, before doing more actions that might push the old ones off the undo history.
Is there a difference between Delete and Shift + Delete?▾
Yes. On Windows and Linux, pressing Delete sends a file to the Recycle Bin or Trash where you can recover it. Pressing Shift + Delete skips the Recycle Bin/Trash entirely and permanently deletes the file immediately. On Mac, Cmd + Delete sends to Trash, and there is no single shortcut to permanently delete from Finder (you empty the Trash instead).
Will undo bring back something I deleted days ago?▾
Undo only goes back through your recent actions in the current session. If you deleted a file days ago, undo will not help. Instead, check the Trash or Recycle Bin on your computer, or the trash folder in your cloud storage service (Google Drive, iCloud, OneDrive). These keep deleted files for about 30 days before permanently removing them.