PDF download Download Article
An easy-to-follow guide to revert changes and undo actions in Google Colab
PDF download Download Article

Did you accidentally delete a cell in Google Colab that contained important code? Or was an earlier version more like what you wanted? This wikiHow article teaches you how to undo a cell change, restore deleted cells using quick keyboard shortcuts, and how to revert your workbook back to a previous version in Google Colab. Colab keyboard shortcuts are different than those used in Jupyter notebooks, but we'll show you the right way to use them.

Things You Should Know

  • To undo a deleted cell on Windows, press "Ctrl + M" and press "Z."
  • To undo a deleted cell on Mac, press "Cmd + M" and press "Z."
  • If you want to restore a previous version of the Colab, go to "File > Revision History > ⋮ > Restore revision."
Section 1 of 3:

Using a Keyboard Shortcut

PDF download Download Article
  1. This quick keyboard shortcut will undo the last action, such as restoring the content of a cell you deleted.
    • To undo with the shortcut on Windows, press Control + M + Z at the same time.
    • To use the shortcut on a Mac, press Command + M + Z at the same time.
    • To redo your last undo, use Control + Shift + Y (PC) or Command + Shift + Y (Mac).[1]
  2. Advertisement
Section 2 of 3:

Using the Edit Menu

PDF download Download Article
  1. You'll see this menu at the top of Colab. The name of the Undo option will vary depending on the type of change you want to undo.
    • For example, if your last action was converting a cell, you'll see Undo cell conversion. If the last thing you did was delete a cell, you'll see Undo delete cell.
    • To redo, click the Edit menu and select Redo.
Section 3 of 3:

Revert to a Previous Version

PDF download Download Article
  1. You'll see this above your document space at the top of Colab.
  2. It's near the bottom of the menu and will prompt a new window to open.
  3. Click the version on the right side of the page and it will display on the left.
  4. This three-dot menu icon is to the right of the version's name and time stamp.
  5. That version will be restored!
  6. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Undo on Pages Undo in Pages on Mac, iOS, and iCloud
Undo in Notes6 Ways to Undo in Notes on iPhone, iPad, and Mac
Check Google Doc History See a Google Doc's Version History
Recover Word Documents6 Effective Ways to Recover Word Documents
Use Keyboard Shortcuts Use Keyboard Shortcuts Like a Pro: The Complete Guide
Restore Last Session on Chrome on PC or Mac Restore Last Session on Google Chrome on PC or Mac
Use Google Spreadsheets Use Google Sheets: The Ultimate Guide for Getting Started
Paste with the Keyboard4 Easy Ways to Paste Text Using Keyboard Shortcuts
Recover Deleted Files from Your Computer8 Ways to Restore Deleted Files on Windows & Mac
Git How to Undo a MergeGit: How to Undo a Merge Locally or After Pushing to a Repository
Recover a Cropped Photo2 Simple Ways to Recover and Undo a Cropped Photo
Unmerge Cells in Excel Unmerge Cells in Microsoft Excel: Step-by-Step Guide
Delete a Table in Google DocsRemoving a Table in Google Docs on a Computer, Phone, or Tablet
Remove a Macro in ExcelRemove a Macro in Excel
Advertisement

About This Article

Stan Kats
Reviewed by:
Professional Technologist
This article was reviewed by Stan Kats and by wikiHow staff writer, Darlene Antonelli, MA. Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals. This article has been viewed 29,964 times.
How helpful is this?
Co-authors: 3
Updated: December 19, 2022
Views: 29,964
Categories: Google Applications
Thanks to all authors for creating a page that has been read 29,964 times.

Is this article up to date?

Advertisement