How to clean up junk files on Mac
Apple's support pages say that removing system junk is necessary to avoid the slowing speed of your devices. Also, they recognize that freeing up storage is necessary to enhance the performance of your Mac. However, Apple don't specify what system junk is and how to get rid of it. So, we'll do it instead.
Keep reading to learn about the most common types of junk and ways to remove them. Why? Because junk not only takes up space but also slows your Mac down and causes system glitches and errors.
What are junk files on Mac?
System junk files may eat up gigabytes of precious Mac storage. The thing is that generating them is a normal part of the macOS operation and using apps. Over time, though, too many of these files may accumulate, and your Mac's speed and performance may drop. So, it's better to know what clutters your computer.
The most common types of system junk files are the following:
- System cache: these are temporary files your macOS needs to run and maintain proper performance.
- User cache: similar to system cache, these are temporary files the apps you use create. They are meant to make the startup of applications faster and the experience of running them more enjoyable.
- Browser cache: files generated by web browsers to speed up the process of loading pages.
- System log files: files storing the activity of macOS and system applications mainly needed for debugging purposes.
- Localization files: also known as language files, they are needed to change the language of macOS and apps interface.
- App leftovers: remnants of the improperly or incorrectly uninstalled apps.
- Unused disk images (.DMGs): app installers you may have left on your Mac after downloading software.
- Xcode junk: project index and build information left by Xcode.
How to remove unnecessary junk files on Mac?
Now as you know what system junk is, we'll show you how to get rid of these unnecessary files in two ways — automatically using a dedicated third-party app and manually.
How to remove junk files in one click
Before proceeding with the manual removal of system junk, let us show you the easy way to remove it forever — CleanMyMac X. This universal cleaning solution for your Mac comes with many modules that can help your Mac work as good as new. It has tools for Mac optimization, malware removal, and uninstalling apps. But, most importantly, it comes with a cleaning tool that will safely delete all of the unneeded system junk files from hard-to-reach places in the system with just a few clicks.
So, how to clean junk files on Mac with CleanMyMac X's System Junk module?
- Download CleanMyMac X for free here.
- Open it and select System Junk from the list of features on the left.
- Click Scan.
- After the scan is complete, click Review Details to learn what will be removed.
- Select the boxes opposite to User Cache Files, System Cache Files, Language Files, and other items you want to delete.
- Hit Clean.
Now, your Mac is back in its out-of-the-box condition! CleanMyMac X deletes junk files, including user cache, system logs, downloads, and even Xcode junk files — all at once to speed up your Mac and free it from clutter.
How to delete junk files manually
If you want to try and hunt down all of the junk files manually, we've prepared some easy-to-follow steps for you, so keep reading.
1. Clear cache files
Here, we'll show you how to get rid of three types of cache files — system cache, user cache, and browser cache.
How to remove system cache on a Mac
These files generated by your macOS usually don't take up a lot of space. However, it's still better to clean them because they may make the system sluggish and unresponsive. Note that you should be extremely careful when removing the system cache to avoid deleting vital files.
Here's how to clean system cache files on Mac:
- Open the Finder.
- Press Command+Shift+G.
- Enter the following path into the field:
/Library/Cachesand hit Return.
- In the window that appears, you will see all your cache files.
- Go through all of the folders you see and remove only what's inside of them.
How to clear user cache files
Also known as app cache, these files may eat up a lot of space, so it's better to remove them. After all, the apps will generate new files if they need more. To get rid of user cache:
- Open the Finder once again.
- After pressing Command-Shift-G, type the following path:
~/Library/Caches(note the ~) and hit Return.
- Like with the system cache, go through folders and delete what's inside.
How to remove browser cache
Deleting what is also known as internet caches helps serve two great purposes: handling potential privacy issues by removing your digital trail and freeing up space on your Mac. The process varies for different browsers, though, so we'll show you how to do it for the three most popular ones.
- Go to Safari > Settings > Advanced.
- Make sure Show Develop menu in menu bar is selected.
- Now, go to Develop > Empty Caches.
- In the address bar, type
- Go to Privacy and security.
- Select Clear browsing data and make sure Cached images and files is selected.
- Hit clear data.
Alternatively, click the vertical ellipsis icon > More tools > Clear Browsing Data and follow steps 3 and 4.
- Open the application menu by clicking three horizontal lines top right.
- Choose History > Clear recent history.
- Check Cache and hit OK.
2. Remove user log files
When your app crashes, you usually are asked to submit a bug report. The system gathers your user logs and includes them in a report. The user log files don't contain information on user activity as it may seem. They only deal with app-level functionality.
If your Mac is old, you probably have a lot of user logs. So, it's time to clean your machine of them.
Follow the instructions to delete user log files on your Mac:
- Open Finder.
- Press Command+Shift+G.
- Enter the following path in the field:
~/Library/Logsand hit Return.
- You will see all the user log files. You can manually move the files from folders to Trash.
If you want to declutter your Mac fully, select all user log files and delete them.
3. Delete system log files
These logs are plain text files, so they usually don't take up a lot of storage. But when you're running out of free space, deleting even such small files may help you declutter your Mac.
It's important to note, though, that cleaning system log files manually, you may accidentally delete some essential data. So, make sure to back up your data to avoid heartache when you delete something important. Using safe cleaning tools notarized by Apple, like CleanMyMac X, can help you prevent the risks of removing valuable data.
So, to clean system log files on your Mac, do the following:
- Open Finder.
- From the Go menu, select Go to folder.
/var/login the field and press Return.
- You will see all the system log files. Select the files you want to remove and drag them to Trash.
You can also find system log files in
/Library/Logs. This folder contains system application logs that aren't essential to store.
If you go to
/Library/Logs/DiagnosticReports, you will find system reports. Safely delete the files to keep your Mac clean and free of clutter.
4. Remove localization files
Thanks to localization and language files, you can set your apps to the language you prefer. But once you determine the language of the app, you may delete other language files:
- Open Finder and go to the Applications folder.
- Right-click any application icon and select Show Package Contents.
- Find the Resources folder and open it.
- All subfolders ending with "lproj" are language files. Each folder contains localization information on a particular language. For example, the folder named en.lproj comprises English language files.
- Select the language folders and move them to Trash.
Don't forget to empty Trash when you're done removing junk files from your Mac.
5. Delete app leftovers
We know that many Mac users delete apps by sending them to Trash. However, even if you empty Trash afterward, it doesn't remove every single trace of the uninstalled application. In fact, a lot of files still clutter your system, so additional effort is needed to get rid of them. To do it, open the Finder, and from the Go > Go to Library, paste the following one by one:
- ~/Library/Application Support
- ~/Library/Internet Plug-Ins/
- ~/Library/Application Support/CrashReporter/
- ~/Library/Saved Application State/
Check the folders and files containing the names of the apps you uninstalled long ago and send them to Trash. Alternatively, you can use the Uninstaller module that comes with CleanMyMac X and its Leftovers tool.
6. Delete unused .DMGs
Checking .DMGs — or app installers — is another way to remove junk from a Mac. These disk images are real space eaters, but they can be removed safely and rapidly.
- Go to your desktop and press Command + F.
- Choose "This Mac" and click + on the right of the window.
- In the dropdown menu, choose File extension from the list.
- Now, type in dmg and review the results, deleting the image of any app you have already installed.
7. Remove large and old files
Except for all of the steps outlined above, it's also a good idea to get rid of the largest files and those you haven't opened for a while. You may start with the Documents or Downloads folder. In either of them, choose View > Sort by Size or Sort by Date Last Opened. Now, browse through your files and send to Trash what you no longer need.
If it seems like a lot of work, we have another tip for you — CleanMyMac X and its Large & Old Files module. It locates the heaviest files and sorts them by size, kind, and date accessed. The best part of using it is that you do not have to browse all of the folders manually — the tool does it for you in a matter of minutes. To run it:
- Open CleanMyMac X from the Applications folder.
- Navigate to Large & Old Files from the sidebar.
- Choose the location you want to scan — hard drive, external drive, or a particular folder.
- Now, hit Scan.
- After the scan is complete, review summary, choose the cleanup option that would work best for you, and press Remove (or Move).
8. How to remove Xcode junk?
If you use Xcode, tons of your disk space gets hogged with old cache and junk that Xcode generates. You might not even notice it until it impacts your Mac's performance. In case you would like to go over all the libraries to remove Xcode junk manually, here's a list of paths you need:
- ~/Library/Developer/Xcode/iOS DeviceSupport
- ~/Library/Application Support/MobileSync/Backup
Important notice: we do not assume responsibility for the possible damage or loss of data that might occur when you manually clean Xcode libraries. Thus, venture this path at your own risk. Or use CleanMyMac X because it knows exactly how to clean Xcode cache, traces, and leftovers and does it neatly, leaving all the important files intact.
Although each system file or user log doesn't seem to take much of your Mac's storage, together, they can make it difficult for your Mac to perform well. That's why it's better to scan your computer for junk files and get rid of them once in a while.