How to undo on Mac: Command-Z and redo
Undo on Mac takes back your last action in almost any app, and in Finder it brings back a file you just moved, renamed or put in the Trash. It can’t bring back files once the Trash is emptied. This guide covers undo and redo, earlier versions of a document for when undo isn’t enough, and reopening a tab you closed.
How to undo on Mac
- Press Command-Z right after the mistake.
- Press it again to step further back. Most apps remember many steps.
From the menu, choose Edit › Undo. The item usually says what it will undo, such as Undo Typing, so you can check before you click.

Redo what you undid
Press Shift-Command-Z, or choose Edit › Redo. Redo works only until you make a new change: after that, the undone steps are gone.
Undo in Finder: bring back a moved or deleted file
- Click the Finder window so it is active.
- Open the Edit menu. The first item says what Undo will do, such as Undo Move of “Report.pdf”.

- Choose it, or press Command-Z.
A file you moved to the Trash with Command-Delete comes back the same way. If you have done other things in Finder since, open the Trash, Control-click the file and choose Put Back: it returns to the folder it came from.

Undo can’t bring back files after you empty the Trash or choose Delete Immediately. Then only a backup helps: see how to back up your Mac and how to delete files on Mac.
Go back to an earlier version of a document
When Command-Z isn’t enough, many apps that save automatically, like TextEdit, Pages and Preview, keep earlier versions of the document.
- In the open document, choose File › Revert To › Browse All Versions.
- Move through the versions with the tick marks on the timeline.
- Click Restore. To keep both, hold Option and click Restore a Copy.
For a quick step back, the same File › Revert To menu also offers Last Opened and Last Saved.
Reopen a tab you closed
In Safari, press Shift-Command-T to reopen the last tab or window you closed. Chrome and Firefox use the same shortcut.
Keep your Mac tidy

MacWashing can’t undo things in other apps. System Junk in MacWashing clears app caches, logs and leftovers of deleted apps, and anything debatable stays unchecked until you decide.
Free trial · macOS 14 or later
Questions and answers
What is the undo shortcut on Mac?
Command-Z undoes, Shift-Command-Z redoes. The Command key is the one with ⌘ next to the space bar.
Can I undo emptying the Trash?
No. Once the Trash is emptied, the files can come back only from a backup, such as Time Machine.
How many times can I press undo?
It depends on the app. Most remember many steps since you opened the document. In Finder, the Edit menu always shows what the next Undo will do.