What "undo log" means and why it matters

An undo log is a record that a program keeps of the changes you make — so you can reverse them. When you delete a file, edit a document, or move something, the program writes that action to its undo log. If you press Ctrl+Z (or Cmd+Z on Mac), the program reads the log backwards and puts things back the way they were.

The undo log itself is usually a hidden file stored on your computer. Most of the time you never see it — the program handles it automatically. But sometimes the log gets deleted, corrupted, or cleared, and you lose the ability to undo recent work. Understanding where these logs live and how they work helps you recover them or prevent losing them in the first place.

Key Takeaways

  • Undo logs are temporary files that programs create automatically; they disappear when you close the program or clear your history.
  • Different programs store undo logs in different places — Word uses AppData on Windows, Google Docs stores nothing locally, and Photoshop uses a separate cache folder.
  • If you closed the program without saving, the undo log is gone and recovery depends on whether the program has a backup or recovery feature.
  • You can prevent undo log loss by saving your work frequently, enabling autosave where available, and checking your program's backup settings before closing.

Where undo logs are stored on your computer

On Windows, most programs store undo logs in temporary folders that are hidden by default. Microsoft Word keeps them in C:\Users\[YourUsername]\AppData\Local\Microsoft\Office\. Adobe programs like Photoshop and Premiere use C:\Users\[YourUsername]\AppData\Local\Adobe\. Text editors like Notepad++ store them in C:\Users\[YourUsername]\AppData\Roaming\Notepad++\.

On Mac, the locations are similar but use different paths. Word stores undo data in ~/Library/Containers/com.microsoft.Word/Data/Library/Application Support/. Photoshop uses ~/Library/Caches/Adobe/. The tilde (~) represents your home folder. You can reach these folders by opening Finder, pressing Cmd+Shift+G, and typing the path.

Cloud-based programs like Google Docs, Microsoft 365 online, and Figma do not store undo logs on your computer at all. They keep the history on their servers. This means you cannot recover an undo log file, but you can usually view version history or restore an earlier version through the program itself — often under File > Version History or a similar menu.

How to recover an undo log after closing the program

If you closed the program without saving, the undo log is almost always gone. Most programs delete their temporary undo files when they shut down. However, some programs offer recovery options that work differently.

Microsoft Office (Word, Excel, PowerPoint) has an AutoRecover feature that saves versions of your document separately from the undo log. If the program crashed or you closed without saving, open the program and look for a recovery pane on the left side, or go to File > Info > Manage Documents > Recover Unsaved Documents. This shows recent versions that were auto-saved, not the undo log itself.

Adobe Creative Suite (Photoshop, Premiere, InDesign) also has auto-recovery. If the program crashed, it will prompt you to recover the document when you reopen it. If you closed it normally, go to File > Revert to recover the last saved version, but this does not restore the undo log — it just goes back to the file on disk.

Google Docs and Microsoft 365 online keep a full version history on their servers. Click File > Version History to see every saved state of the document. You can restore any earlier version, which is more powerful than an undo log because it works even days later.

Clearing or resetting an undo log intentionally

Sometimes you want to clear the undo log — for example, if you made a mistake you do not want someone else to undo, or if the log is taking up disk space. The simplest way is to close and reopen the program. The undo log is cleared automatically.

In some programs you can also clear it manually. In Photoshop, go to Edit > Purge > Undo History. In Word, there is no direct menu option, but closing the document and deleting the temporary files in AppData will do it. In most text editors, Edit > Clear History or a similar option exists.

Be aware that clearing the undo log is permanent and immediate. You cannot undo the clearing itself. If you think you might need to reverse recent changes, save the document first under a different name, then clear the log.

Why undo logs disappear and how to prevent it

Undo logs vanish for several reasons. Closing the program is the most common — the temporary files are deleted as part of normal shutdown. Restarting your computer also clears them. Running disk cleanup tools or antivirus software can delete temporary files, including undo logs. A program crash may corrupt the log so it cannot be read. And if your hard drive runs out of space, some programs stop writing to the undo log to save room.

To prevent losing an undo log, save your work frequently — every few minutes if you are making important changes. Enable autosave if your program offers it. In Word, go to File > Options > Save and turn on AutoRecover. In Google Docs, autosave is always on. In Photoshop, File > Preferences > File Handling has auto-save options. Keep your hard drive at least 10 percent free so programs have room to write temporary files.

If you are working on something critical, save multiple versions with different names — like "Document_v1", "Document_v2" — so you have fallback copies even if the undo log fails. This is more reliable than depending on undo alone.

The difference between undo logs and file recovery

An undo log and file recovery are not the same thing. An undo log is a temporary record of changes within a single session — it exists only while the program is open and disappears when you close it. File recovery is about restoring a file that was deleted from your hard drive, which is a different process entirely.

If you deleted a file by accident, undo logs cannot help you. Instead, you would use Windows File Recovery (on Windows) or a third-party recovery tool to scan your hard drive for deleted files. If you deleted a file and then emptied the Recycle Bin, recovery becomes harder but is sometimes still possible if the disk space has not been overwritten.

If you edited a file and then closed the program without saving, the undo log is gone, but the file itself still exists on disk with the old version. You can open it again and the changes will not be there — which is why saving frequently matters.

Undo logs in different programs

Microsoft Word and Excel keep undo logs in memory and in temporary AppData folders. The undo history is usually 100 actions deep by default, but you can change this in File > Options > Advanced > Undo. Closing the document clears the log.

Adobe Photoshop stores undo history in a cache folder and also offers a History panel (Window > History) that shows your recent actions. You can click any step to jump back to it, but this only works while the file is open. Closing the file clears the history.

Google Docs, Sheets, and Slides do not have traditional undo logs. Instead, they keep a complete version history on Google's servers. You can see who made each change and when. Go to File > Version History to access it. This history persists even after you close the document.

Visual Studio Code and other code editors store undo logs in a hidden .vscode folder in your project directory. The log persists between sessions, so you can undo changes even after closing and reopening the file. Deleting the .vscode folder will clear it.

Frequently Asked Questions

Can I recover an undo log after I restart my computer?

No. Restarting clears the undo log because it is stored in temporary memory and temporary files. Once the computer shuts down, the log is deleted. If you need to recover work from before the restart, check whether your program has autosave or version history features instead.

What if my undo log file got corrupted?

If the undo log is corrupted, the program usually cannot read it and undo stops working. Close the program and delete the corrupted temporary files manually from the AppData or cache folder, then reopen the program. This resets the undo log to empty, but the program will work normally again.

Does clearing my browser cache delete undo logs?

No, not for desktop programs. Browser cache only affects web browsers and online programs. If you are using Google Docs or Microsoft 365 online, clearing your browser cache does not affect the version history stored on the company's servers. For desktop programs like Word or Photoshop, browser cache has no effect.

Can I recover an undo log from a backup?

Only if your backup software backed up the temporary files, which most do not. Standard backups capture your saved documents, not the temporary undo logs. If you have a system image backup (a complete copy of your hard drive), you could restore the AppData or cache folder from an earlier time, but this is rarely worth the effort.

Why does my undo history only go back a few actions?

Most programs limit undo depth to save memory. Word defaults to 100 actions, Photoshop to 20 or 50 depending on your settings. You can increase this in the program's preferences, but it uses more RAM. If you need to go back further, save versions of your document with different names instead of relying on undo alone.