The quickest way to undo a delete

Press Ctrl+Z on Windows or Command+Z on Mac when ready after you delete something. This works in nearly every text editor — Word, Google Docs, LibreOffice, Apple Pages, and most others. The undo command restores what you just deleted, one action at a time. If you undo too far and delete something you wanted gone, press Ctrl+Y (Windows) or Command+Shift+Z (Mac) to redo.

The catch: undo only works for actions you performed in the current session. Once you close the document without saving, or if your program crashes, the undo history is gone. If you saved the document after deleting something, undo will not bring it back — you will need to recover an earlier version instead.

Key Takeaways

  • Ctrl+Z (Windows) or Command+Z (Mac) undoes your last action when ready, and works in almost every text editor.
  • You can undo multiple steps in a row by pressing the shortcut repeatedly, and redo with Ctrl+Y or Command+Shift+Z if you go too far.
  • Once you close the document or save it, undo stops working — you will need to recover a previous version instead.
  • Word, Google Docs, and most editors keep a version history that shows you what the document looked like at earlier times.
  • If you deleted text more than a few minutes ago and already saved, checking the trash or recycle bin on your computer may recover the file itself.

Using undo in Word

In Microsoft Word, Ctrl+Z undoes your last action. You can press it repeatedly to step backward through your edits — each press undoes one more thing. Word keeps roughly 100 undo steps by default, though you can change this in settings if you need more history.

If you want to see what you are undoing before you do it, click the small arrow next to the undo button in the toolbar (the curved arrow pointing left). This shows a list of recent actions. Click any action in the list to undo everything back to that point. The same works for redo — click the arrow next to the redo button to jump forward to a specific action.

If you already saved the document after deleting, undo will not work. Instead, open the File menu, select "Info," then look for "Version History" or "Manage Document." Word keeps automatic backups of recent versions, and you can open an older one to recover the deleted text.

Using undo in Google Docs

In Google Docs, press Ctrl+Z (Windows) or Command+Z (Mac) to undo. Google Docs keeps your entire edit history automatically — you never lose undo, even after you close the document. This is one of the biggest differences from Word: you can come back to a Google Doc days later and still undo changes from when you first created it.

To see the full history, click "File," then "Version history," then "See version history." A panel opens on the right showing every version of the document, with timestamps. Click any version to view it, and click "Restore this version" to go back to that point. You can also see who made each change if multiple people edit the document.

Google Docs also shows you a list of recent actions if you click the undo arrow in the toolbar. This is useful if you want to undo several things at once without pressing the shortcut multiple times.

Using undo in LibreOffice and Apple Pages

LibreOffice Writer works like Word: press Ctrl+Z to undo, and the program keeps roughly 100 steps of history. Once you close the document, undo is gone. LibreOffice does not have built-in version history like Google Docs, so if you need to recover something after saving, you will need to check your computer's file recovery tools or look for a backup file.

Apple Pages (on Mac or iPad) keeps full version history like Google Docs. Press Command+Z to undo, and the history stays even after you close the document. To see all versions, click "File," then "Browse All Versions." A timeline appears showing every saved version. Click any version to view it, and click "Restore" to go back.

When undo does not work: recovering deleted text from version history

If you closed the document or saved it after deleting, undo will not bring the text back. Your next option depends on which program you use. Google Docs and Apple Pages keep automatic version history, so open the version history panel and look for a version from before you deleted the text. Click it to restore.

Word users should check the "Version History" option in the File menu. If you have OneDrive or SharePoint enabled, Word may have saved automatic versions. If not, you will need to check your computer's file recovery tools — Windows has a "File History" feature and Mac has "Time Machine" that can recover older versions of files.

LibreOffice does not keep automatic versions, but your operating system might. On Windows, right-click the file, select "Properties," then look for a "Previous Versions" tab. On Mac, open the folder containing the file, right-click it, and select "Look for items similar to [filename]" — this searches Time Machine backups.

Recovering a deleted file from your computer's trash

If you deleted the entire document file (not just text inside it), check your computer's trash or recycle bin. On Windows, open the Recycle Bin on your desktop or search for it in the Start menu. On Mac, click the Trash icon in the Dock. Look for your file, right-click it, and select "Restore" or "Put Back." The file returns to its original location.

Files in trash are usually kept for 30 days before being permanently deleted, though this varies by operating system and how your computer is set up. If the file is not in trash, it may be permanently gone — professional data recovery services exist but are expensive and not always successful.

Preventing accidental deletes

The best protection is to save your work often. In Word, Google Docs, and most editors, you can turn on autosave — Word calls it "AutoRecover," Google Docs saves automatically, and LibreOffice has an autosave option in Tools > Options. With autosave on, your document is backed up every few minutes, so even if you delete something and forget to undo before closing, you can recover an earlier version.

For important documents, consider keeping a backup copy in a separate location — a second folder, an external drive, or cloud storage. This protects against both accidental deletion and hardware failure. Google Docs and OneDrive make this straightforward because they sync automatically, but you can also manually save copies of Word or LibreOffice documents.

Frequently Asked Questions

Can I undo something I deleted hours ago?

Only if you have not closed the document. If the document is still open, press Ctrl+Z (or Command+Z) repeatedly to step back through your edits. If you closed it, check the version history in Google Docs, Word, or Apple Pages — these programs keep automatic backups. LibreOffice does not, so you would need to use your operating system's file recovery tools.

What if I undo too much and delete something I wanted gone?

Press Ctrl+Y (Windows) or Command+Shift+Z (Mac) to redo. This steps forward through your actions one at a time. You can also click the redo arrow in the toolbar to jump to a specific action.

Does undo work after I save the document?

No. Once you save, undo stops working because the document is now stored on disk. To recover deleted text after saving, use version history in Google Docs, Word, or Apple Pages. If you use LibreOffice, check your operating system's file recovery tools like Windows File History or Mac Time Machine.

Can I recover a document I permanently deleted from trash?

Probably not without professional help. Once a file is emptied from trash or recycle bin, it is very difficult to recover. The best prevention is to keep important documents in cloud storage like Google Drive or OneDrive, which keeps version history even after you delete the file.

How many undo steps do text editors keep?

Word and LibreOffice keep roughly 100 steps by default. Google Docs and Apple Pages keep your entire edit history forever. If you need more undo steps in Word, you can increase the limit in File > Options > Advanced, then search for "undo."