How To Undo On Mac

I accidentally deleted and changed a bunch of text and files on my Mac and realized too late that I don’t fully understand how the undo feature works outside of just Command+Z in one app. Is there a reliable way to undo recent actions across different apps or Finder, and are there any limitations or settings I should know about so I don’t lose work again?

Short version. Undo on a Mac is local and fragile. Backups are your real safety net.

Here is what you can do, and what you cannot.

  1. Command+Z basics
  • Works per app, per document.
  • Most apps keep an undo stack until you close the document or quit the app.
  • Once you quit, that history is gone for most apps.
  • Some apps have multiple levels of undo, some only one.
  1. Undo in Finder
  • Command+Z in Finder undoes the last file action in Finder.
    Move, rename, delete to Trash, etc.
  • It only tracks actions done in Finder, not in other apps.
  • Sequence matters. If you did many things, it walks them back in reverse order.
  • If you emptied Trash, Command+Z will not pull files back.
  1. Deleted files
  • First, check Trash. Command+Delete only moves to Trash. Restore from there.
  • If Trash is empty, you need a backup or recovery tool.
  • Time Machine is the built in option.
    Open the folder, click the Time Machine icon, go back in time, restore the file.
  • Without a backup, file recovery tools have mixed results on APFS. The success rate drops fast once the disk writes new data.
  1. Undo text changes across apps
  • There is no global system wide undo for text.
  • Each app keeps its own history.
  • For big edits, use apps with:
    • Version history (Pages, Word, Google Docs).
    • Auto save and versions (TextEdit with iCloud, Apple apps).
  • Some apps on macOS support File > Revert To > Browse All Versions. That shows previous versions stored by the system.
  1. System level “undo”
  • Time Machine:
    • Best way to undo file level mistakes, including folders or entire projects.
    • You set it once, it runs in the background.
    • Hourly backups for 24 hours, daily for a month, weekly after that, until the backup disk is full.
  • Third party sync and backup:
    • iCloud Drive, Dropbox, Google Drive often have version history and file restore on the web.
    • Helpful if you deleted or overwrote files inside those folders.
  1. What to set up now so this hurts less next time
  • Turn on Time Machine with an external drive.
  • For work files, store them in something with version history, like iCloud Drive or Dropbox.
  • For long writing sessions, use apps with auto versioning and do occasional manual “Duplicate” or “Save As” snapshots.
  • Avoid working on the only copy of anything important.
  1. For your current mess
  • Stop doing file operations on that Mac to avoid overwriting deleted data.
  • Check Trash.
  • Check Time Machine or any cloud service you use for restore or version history.
  • For huge losses and no backup, look at data recovery tools or a recovery service, but results are uncertain and sometimes expensive.

macOS undo is useful, but it is not global and not durable. Think of it as a short term safety net and let Time Machine and cloud history handle the rest.

You’ve already got a solid breakdown from @sterrenkijker. I’ll come at it from a slightly different angle and focus on how to live with the fact that macOS undo is kinda… fickle.

First thing: there is no single “global undo” on a Mac. That idea just doesn’t exist in macOS. Once you accept that, the trick is to build your own layers of “undo” using different tools and habits.

1. Think in “layers of safety,” not just Command+Z

Instead of relying on Command+Z, think like this:

  1. Per‑app undo

    • Text changes in a document: that app’s undo is your first safety layer.
    • If it’s important text, keep the app open until you’re sure you’re done. Quitting usually kills the undo stack.
    • For long sessions, occasionally:
      • File > Duplicate or
      • File > Save As… (in apps that still support it).
        That’s a manual snapshot that ignores the fragile undo history.
  2. Per‑file versioning

    • A bunch of Apple and Apple-ish apps hook into macOS versions: Pages, Numbers, Keynote, TextEdit, Preview, some third‑party editors.
    • Use File > Revert To > Browse All Versions when available.
    • Here’s where I’ll slightly disagree with relying purely on Time Machine for everything: built‑in “Revert To” is often faster and more precise than digging into your whole-system backup. It’s closer to what people wish Command+Z did for files.
  3. Folder / project level: Time Machine or similar

    • This is the “I broke a whole folder” or “I deleted the wrong project yesterday” level.
    • Time Machine is great, but it’s also slow and clunky for lots of tiny restores, so don’t treat it as your only undo. It’s more like your last-resort time travel.

2. Text specifically: protect yourself before you regret it

For text work, I wouldn’t trust undo alone. Better ideas:

  • Use apps with robust version history

    • Word, Pages, Google Docs, Notes, Drafts, Obsidian, etc.
    • Many of these auto-save and keep versions you can roll back to without touching system backups.
  • Use “checkpoint” files

    • When you finish a big section, save a copy with a suffix like myfile-v1, myfile-v2.
    • It feels old-school, but it survives quitting, crashes, and your future self doing something dumb.
  • For coding / writing that evolves a lot

    • Git or any version control, even if you’re the only user.
    • Commit early, commit often. That’s basically industrial-strength undo.

3. Files & Finder mistakes: what people often miss

  • Command+Z in Finder has a memory, but it’s linear and dumb

    • You can’t say “undo the third thing I did earlier,” it will just step backwards one action at a time.
    • If you keep using Finder after a mistake, you may have to undo a bunch of unrelated actions to get back to the one you actually care about. That’s where it becomes more confusing than helpful.
  • Cloud sync as stealth undo

    • If you keep files in iCloud Drive, Dropbox, OneDrive, Google Drive, etc, they usually keep:
      • Deleted file restore
      • Previous versions
    • This can be more effective than traditional “undelete” tools, because the cloud saw the file before it vanished from your Mac.

Here I’ll push back a bit on the idea that file recovery tools always have “mixed” results and that’s it. On APFS they are definitely less reliable than in the old HFS+ days, but if the files are super important and you stopped using the disk immediately, pro data recovery services sometimes pull off miracles. They’re just painfully expensive and absolutely not guaranteed.

4. Practical habits so you’re not in this spot again

Concrete things I’d do from now on:

  • Turn on Time Machine to an external drive and forget about it once it’s set.
  • Keep anything important in a location with version history (iCloud Drive, Dropbox, Google Drive).
  • For critical docs:
    • Use an app with versions or auto-save
    • Take manual snapshots: duplicate files, export PDFs, or commit to git.
  • Try not to treat a single file in a single location as the one true copy of anything you care about.

5. For your current situation

In your shoes, I’d:

  1. Stop writing large new files or moving a lot of stuff around on that Mac.
  2. Check Trash.
  3. Check iCloud Drive / Dropbox / etc web interface for deleted items or versions.
  4. Check Time Machine if you had it.
  5. Only then, consider data recovery software or a pro service if the stakes justify the cost and hassle.

So: no, there isn’t a reliable, system-wide “oops undo everything I just did all afternoon” button on macOS. The reliable part comes from stacking: app undo + app versions + cloud versions + Time Machine. One by one, they add up to something much closer to what you were hoping Command+Z could do on its own.