The quickest way to undo a delete

Press Ctrl+Z on Windows or Command+Z on Mac immediately after you delete something. This restores the text, image, or formatting you just removed. The undo command works in nearly every text editor — Microsoft Word, Google Docs, Apple Pages, and most others — and it works for the last several actions you performed, not just the most recent one.

If you already closed the document without saving, undo will not work. Once you shut down the program or close the file, the undo history disappears. If you saved the document after deleting, undo still works within that session, but closing and reopening the file means the deletion is permanent unless you use version history or a backup.

Key Takeaways

  • Ctrl+Z (Windows) or Command+Z (Mac) undoes your last action, and you can press it multiple times to step back through recent changes.
  • The undo command only works while the document is open in the same session — closing the file erases the undo history.
  • Google Docs and Microsoft Word both store version history, which lets you recover deleted text even after you save and close the document.
  • If undo does not work, check the Edit menu for an Undo option, or look for version history in your cloud storage or the application itself.

Using undo in Microsoft Word

In Microsoft Word, Ctrl+Z (Windows) or Command+Z (Mac) undoes your last action. You can press it repeatedly to step back through multiple changes. Word shows you a list of recent actions in the undo dropdown — click the arrow next to the undo button in the toolbar to see what you can undo and jump back to any point in that list.

If you saved the document after deleting the text, Word's version history can still recover it. On Windows, go to File > Info > Version History. On Mac, click File > Version History. Word displays a timeline of saved versions. Click any earlier version to open it in a side panel, and you can copy the deleted text back into your current document.

Using undo in Google Docs

In Google Docs, press Ctrl+Z (Windows) or Command+Z (Mac) to undo. Google Docs also saves every change automatically, so you can recover deleted text even if you closed the document hours or days ago. Click File > Version History > See Version History to open the revision panel on the right side of the screen.

The version history shows a timeline with timestamps. Click any point in the timeline to see what the document looked like at that moment. When you find the version with your deleted text, you can copy it and paste it back into the current version. Google Docs keeps version history for at least 30 days, and longer if you have made many edits.

Using undo in Apple Pages and other editors

In Apple Pages, press Command+Z to undo. Pages also keeps version history — go to File > Revert To > Browse All Versions to see past versions of your document. Click any version to open it and copy the deleted content back.

Most other text editors follow the same pattern: Ctrl+Z or Command+Z for undo, and a version history or revision feature in the File menu. Some editors like LibreOffice and OpenOffice store versions automatically; others require you to manually save versions. Check your editor's Help menu if you cannot find the version history option.

What to do if undo is not available

If undo does not work, the document was likely closed and reopened, which clears the undo history. Check whether your document is stored in cloud storage like OneDrive, Google Drive, or iCloud. These services often keep file backups or version history that you can access even after closing the document.

For OneDrive files, right-click the file in OneDrive online and select Version History. For Google Drive, open the file and go to File > Version History > See Version History. For iCloud, open the file in Pages and check File > Revert To. If the document was never saved to cloud storage, check your computer's backup system — Windows has File History, and Mac has Time Machine — to restore an earlier version of the file.

Preventing accidental deletion

The best protection against losing text is to save your document regularly and use cloud storage. Google Docs and OneDrive save automatically, so you always have a recent version to fall back on. If you use Word or another editor that requires manual saving, save after each major section or every few minutes.

You can also turn on Track Changes in Word or Suggestion Mode in Google Docs. These features record every deletion as a tracked change rather than removing the text outright, so you can see what was deleted and restore it if needed. In Word, go to Review > Track Changes > Track Changes. In Google Docs, click the pencil icon in the top right and select Suggestion mode.

Frequently Asked Questions

How many times can I undo?

Most editors let you undo at least 100 recent actions, though the exact number depends on the program and your computer's memory. Word typically stores 100 undos by default. Google Docs stores your entire edit history as long as the document exists. Once you close the document, the undo history is gone.

Can I undo after I save the document?

Yes, as long as the document is still open. Saving does not clear the undo history. However, if you close the document and reopen it, the undo history is gone. That is when you need version history instead.

What if I deleted something days ago?

If the document is still open, undo will not reach back that far. Use version history instead. Google Docs keeps versions for at least 30 days. Word and Pages keep versions as long as you have saved them. Check your cloud storage or the application's version history feature to find an earlier version of the document.

Does undo work for images and tables?

Yes. Undo works for any content you delete — text, images, tables, formatting, and more. Press Ctrl+Z or Command+Z the same way you would to undo deleted text.