Keeping at least 10 percent of your Mac's total space free is a good practice to ensure its proper performance. However, what to do if there's seemingly nothing that you can delete? The answer is simple — clean junk files. In this article, we'll explain what these files are and how to find and remove them. Not only will it free up some storage, but it will also speed up your Mac. Let's go!
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 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 that you know what system junk is, we'll show you how to delete unnecessary files on Mac 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 junk, let us show you the easy way to remove it forever — CleanMyMac. This universal cleaning solution for your Mac comes with many tools 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 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's Cleanup tool?
- Download CleanMyMac for free here.
- Open it and click Cleanup from the list of features on the left.
- Click Scan.
- After the scan is complete, click Review All Junk to learn what will be removed.
- Select the checkboxes opposite to files in User Cache Files, System Cache Files, Language Files, and other items you want to delete.
- Click Clean Up.
Now, your Mac is back in its out-of-the-box condition! CleanMyMac 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/Caches
and press 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 press 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.
Safari:
- Go to Safari > Settings > Advanced.
- Make sure Show Develop menu in menu bar is selected. In macOS Sonoma, this option is Show features for developers.
- Now, go to Develop > Empty Caches.
Google Chrome:
- In the address bar, type
chrome://settings
- Go to Privacy and security.
- Select Clear browsing data and make sure Cached images and files is selected.
- Click Clear data.
Alternatively, click the three dots icon > Clear Browsing Data and follow steps 3 and 4 above.
Firefox:
- Open the application menu by clicking three horizontal lines top right.
- Choose History > Clear recent history.
- Check Cache and click 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 computer 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/Logs
and press 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 vital 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, 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.
- Type
/var/log
in 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 stores 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 Folder, paste the following one by one:
- ~/Library/Application Support
- /Library/Caches/
- ~/Library/Caches
- ~/Library/Internet Plug-Ins/
- ~/Library/
- ~/Library/Preferences/
- ~/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.
If it seems like a lot of work, that's because it is. But luckily, there's an easier way to clean junk files left by apps you removed long ago — you can use the Applications tool that comes with CleanMyMac and its Leftovers feature. It quickly scans all folders on your Mac and finds files scattered across your system after manual app removal. This way, it ensures a clean uninstall even if the main app has long been missing. Here's how it works:
- Open CleanMyMac.
- Click Applications > Scan.
- If any files were left over after the incomplete app removal, you will see a corresponding message and the Remove button under the App Leftovers tile.
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 and its Large & Old Files tool. 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 from the Applications folder.
- Navigate to My Clutter from the sidebar.
- Choose the location you want to scan — hard drive, external drive, or a particular folder — and click Scan.
- After the scan is complete, click Review All Files and check out the summary of large and old files found.
- Select files for deletion and click Remove.
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/DerivedData
- ~/Library/Developer/Xcode/Archives
- ~/Library/Developer/Xcode/iOS DeviceSupport
- ~/Library/Developer/CoreSimulator
- ~/Library/Caches/com.apple.dt.Xcode
- ~/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 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.