How to Find and Delete Empty Folders on Mac

You may have a lot of empty folders on your Mac. If you want to tidy up your Mac, finding and deleting these empty folders is an easy process. Sometimes you may create these folders and forget about them, and sometimes the apps you install create and leave them behind. The empty folders take up little storage space, but you may want to find and delete them to keep your computer more organized. In this article, I describe how you can do this. By following the steps below, you will be able to find all the empty folders in the Home directory, including all its subdirectories.

As I stated above, finding empty folders is easy. For this, we will be using Terminal. But, just as a warning, I advise you to be careful before deleting them, because some apps may want to have that folder, even if it is empty. Deleting the folder may cause the app to malfunction. I will explain this more below.

Find and delete empty folders

As I said above, this article describes finding the empty folders in your Home directory. Of course, you can adjust the command line below to change the directory. But, especially if you are deleting folders, I do not recommend messing with directories outside of your Home directory unless you have a good idea of what you are doing. The Home folder contains many subfolders, including: Applications, Desktop, Documents, Downloads, My Games, Movies, Music, Pictures and Public. Here is how you can find the empty folders:

  1. Open Terminal on your Mac. Terminal is located in Applications > Utilities. You can just press Command (⌘) – Space Bar, then type Terminal.
  2. Enter the following command, then hit enter. You may be asked to give Terminal permission to access certain subfolders. Please note that in the screenshot, serhatkurt is the Home folder, and in the code box below, macreports is the Home folder. Replace it with the name of your Home directory. If you do not know yours, there are a few ways to figure it out, which I will explain in the section below.
find /Users/macreports -type d -empty
Find and delete empty folders
  1. Terminal will list all empty folders and subfolders. You will probably see many lines scroll by in Terminal while these folders are being found. You can delete them all easily, if you really want to do that. Again, this may cause issues later with some apps, if you delete a folder the app wants to use. We really recommend you do a full backup before you delete anything. If you want to delete all of the empty folders in your Home directory, type the following command and hit enter. Again, replace macreports with your Home directory name:
  • All of these empty directories will be gone in a few seconds. There is no undo option. They will be gone. The only way to bring them back is to restore your Mac from a backup, like a Time Machine backup, if you have one.
find /Users/macreports -type d -empty -delete

Find the name of your Home directory

If you do not know the Home directory’s short name, follow these steps:

  1. Open a Finder window.
  2. From the menu bar at the top of your screen, click Go, then select Home.
  3. You will see your Home directory’s name at the top of the Finder window.
Home folder name

Related articles

Dr. Serhat Kurt worked as a Senior Technology Director. He holds a doctoral degree (or doctorate) from the University of Illinois at Urbana / Champaign and a master’s degree from Purdue University. Here is his LinkedIn profile.

Thank you for choosing to leave a comment.

Please note the following:

  • All comments are moderated.
  • Your email will NOT be published nor shared.
  • All SPAM comments will be deleted.
  • Please see our comment policy page for more info.

Leave a Comment