Mac Tutorials

How to Undo Clean Up on Mac

The quick and easy way to reverse any unintended cleaning actions on Mac is to use the undo keyboard shortcut. It can not only restore files you just deleted but also recover deleted text and more:

  1. On your Mac’s keyboard, hold down the Command (cmd) key.
  2. Press the Z key.

Have you accidentally deleted an important file, important text inside a document, or other content on your Mac? As long as you act fast enough, you can quickly reverse many actions using the undo feature built into macOS. In addition to using the keyboard shortcut outlined above, you can also undo clean up on Mac by clicking File > Undo in your Mac’s menu bar.


Before we begin


Are you trying to free up storage space on your Mac? Let MacKeeper’s Safe Cleanup take care of the hard work for you. It can delete hidden and unwanted junk from your machine safely—without removing files that macOS or your apps rely on.


Here’s how to get started with MacKeeper’s Safe Cleanup:

  1. Download MacKeeper and install the app on a Mac.
  2. When it opens, select the Safe Cleanup tool in the sidebar.
  3. Click Start Scan to uncover hidden junk on your system.
  4. Select the files you want to delete, then click Clean Junk Files.

How to undo clean up on a Mac with a keyboard

There’s a quick and easy way to undo clean up on a Mac keyboard using a simple shortcut—follow these two simple steps:

  1. Hold down the Command (cmd) key.
  2. Press Z.

As Mac experts, we should clarify that the undo function built into macOS doesn’t work in all situations, and it has its limitations. For instance, you can’t always recover deleted files on Mac by emptying the trash can. In some situations, however, this fix will only work once.


In contrast, if you’re writing a text document inside Pages or Microsoft Word, for example, you’ll be able to use the undo function multiple times to reverse additions or changes you’ve made. Similarly, you can use undo over and over again to remove files you’ve deleted from a folder. However, in other apps, like certain versions of Adobe Photoshop, it may only work once by default.


The other important thing about undo is that there’s no clear limit for how many actions you can reverse across all apps. Each has its own rules, and not all will remember your most recent actions if you switch to another app and then switch back. With that being the case, we suggest you undo your actions as quickly as possible.

How to cancel clean up actions of folders on Mac

You can undo clean up actions on Mac when organizing folders in the same way you can reverse other actions you take in macOS. One of the easiest methods, of course, is the following:

  1. Select the Edit option in your Mac’s menu bar.
  2. Click Undo.
To cancel clean up actions of folders on your Apple computer, you need to go to your Mac menu bar. See, it shows all options under the Edit menu. Select undo to reverse your most recent actions.
Click Edit in your Mac’s menu bar > choose Undo

Alternatively, you can use the simple keyboard shortcut to cancel your actions faster:

  1. Hold down the Command (cmd) key on your Mac’s keyboard.
  2. Press the Z key.

Didn’t work for you? In some cases, you might need to add Shift in this combination:

  1. Hold down the Command (cmd) and shift keys on your keyboard.
  2. Press the Z key.

You’ll be able to use the undo action multiple times to cancel several of your most recent steps, but be aware that there’s a limit to how many actions you can reverse, and that limit isn’t always clear. It can depend on a number of things, such as the type of actions you’ve carried out.

Note from our team: 


Not all actions can be canceled with the handy Mac keyboard shortcuts. Namely, changing the placement of files within a folder and restoring files that have already been cleared from the trash can are some of the things you cannot manage with the undo function.

How to undo a desktop clean-up on Mac

When you want to quickly undo a desktop clean-up action on Mac, do this:

  1. Hold down the Command (cmd) key on your keyboard.
  2. Press the Z key.

Be aware that you can only undo a handful of your most recent actions, so reverse unwanted changes as quickly as possible.


The key nuance to bear in mind when undoing cleanup actions on the desktop is that certain things cannot be reversed. If you manually change the placement of icons and decide you prefer your previous layout, undo won’t let you send items back to their original positions. However, you can switch between different Clean Up options.


To do this, follow these steps:

  1. Right-click on your Mac’s desktop.
  2. Under Clean Up By, choose your preferred setting.
The right-click menu on the Mac desktop shows all clean up options. Choose your preference under Clean Up By to organize all files and folders on your desktop.
Right-click on your desktop > choose an option under Clean Up By

Using this feature, you can organize desktop items by name, kind, size, and more. You can then quickly switch back and forth by repeating the steps above.

What effect does cleaning up have on Mac?

When you let your Mac become cluttered, it can impact its performance, slowing down your apps and macOS itself. Controversially, regular cleaning and removing unwanted files will help you eliminate this problem and speed things up.


Cleaning can also improve the performance of features like Spotlight. By reducing the amount of unwanted data on your computer, you make it easier for macOS to keep track of everything. This means less Spotlight indexing, which reduces the amount of power Spotlight needs.


Finally, a well-organized Mac is just easier and more enjoyable to use. When you remove unnecessary junk and carry out frequent cleans, it becomes quicker and easier to find the files, folders, and other content that you need to access all the time.

It’s easy to undo mistakes on Mac

Cleaning your Mac may not be fun, but Apple makes it easy to undo common mistakes by giving us the undo and redo functions. A simple keyboard shortcut or a couple of quick mouse clicks can restore accidentally deleted files, recent changes made to documents, and lots more. It’s important to remember, however, that undo and redo have their limits.


If you need to know how to clean up Mac faster and more effectively, try deleting unwanted files using MacKeeper’s Safe Cleanup utility. It identifies unnecessary junk, safely removes it without impacting the stability of your Mac, and quickly frees up plenty of storage space.

Use your Mac to the fullest! Sign up and get:
Effective tips on how to fix Mac issues
Reliable advice on how to stay safe online
Mac-world news and updates

Thank you!

You’ll love exploring your Mac with us.

Oops, something went wrong.

Try again or reload a page.

Here’s another sign you need to upgrade your macOS ASAP:

30% off your MacKeeper subscription

Сopy the code now and use it in the MacKeeper checkout after the upgrade.

Copy Code

Please be aware that this code cannot be combined with any other discounts, offers, or promotions.

Tech troubles? We can help!

Receive expert guidance and find perfect solutions for your tech challenges.



MacKeeper - your all-in-one solution for more space and maximum security.

Try Now

Read more

How to Uninstall Origin Client on Mac
How to Uninstall Origin Client on Mac
How to Open EXE Files on Mac
How to Open EXE Files on Mac

Run Application


Click Continue


Click Install


Your macOS version is lower than OS 10.11. We’d like to offer you MacKeeper 4 to solve the cleaning, privacy, and security issues of your macOS.