TL;DR
To clear temp files on Mac, follow one of these methods:
- Use MacKeeper Safe Cleanup to remove all temp files in one click.
- Go to
~/Library/Caches
and delete specific app cache files. - Go to
~/Library/Logs
in Finder and delete the contents of the log files or use thesudo rm -rf /private/var/log/*
command to delete log files. - Go to System Settings > General > Transfer or Reset and select Erase All Content and Settings to reset system settings.
Recently, my MacBook Air M2, 2022 started lagging a lot. I tried everything – closing apps, force-quitting programs, restarting the Mac – but nothing worked. Then I figured out the problem: too many temp files. It was shocking to see how many there were! After I cleaned these out, my Mac sped up a lot. So, I thought I’ll share how to delete temp files on Mac and get it running fast again.
Before We Begin
Junk and temp files occupy a lot of disk space and make your Mac slow and laggy. To improve your Mac’s performance and prevent excessive lag, download MacKeeper and clear temp files on Mac using its Safe Cleanup feature.
What Are Temp Files on Mac?
Temp files, short for temporary files, are generated on your Mac during various tasks and processes. These files are used by applications, system services, and the macOS itself to store data temporarily while performing operations.
Some common temp files on Mac include the following:
Type of Temp Files | Description |
---|---|
🚀 Application Cache | Files saved by apps to speed up loading times and enhance user experience. |
💾 System Cache | Files created by macOS and system processes for improved performance. |
🌐 Browser Cache | Files, such as images and HTML, stored by browsers to speed up the loading of websites. |
📋 Log Files | Records of system and app events, errors, and diagnostics information. |
📥 Downloaded Files | Files downloaded by apps, installers, or system updates that may no longer be necessary after installation. |
📧 Mail Attachments | Files received as email attachments and downloaded locally by your email client. |
📱 Old iOS Backup Files | Backup files from previous iOS devices that are no longer needed, which can be created when syncing your iPhone or iPad with your Mac. |
⏬ Partial Downloads | Incomplete downloads from browsers or download managers that may have been interrupted or paused. |
How to Find the Main Temporary Folder on Your Mac
Temporary files on a Mac are stored in multiple locations, which can make it challenging to locate them. However, you can easily access the primary temporary folder using Terminal. Here’s how:
- Launch Terminal via Spotlight search (Command ⌘ + Spacebar).
- In the Terminal, type the following command and press Enter:
open $TMPDIR
- This will open the main temporary folder on your Mac.
Besides the main temporary folder, your Mac contains additional temporary directories, which can be found at:
/tmp
/private/var/tmp
/private /var/at/tmp
/private/var/spool/cups/tmp
Moreover, caches, which are part of temporary files, are located in the Caches folder within the user directory. These caches store temporary files for your applications.
Now that you’re familiar with the locations of temporary files on your Mac, let’s see how to remove them.
Clear All Temporary Files In A Single Click Using MacKeeper
Why You Can Trust MacBook Journal We always conduct first-hand research and verify every method or solution we present, ensuring you receive reliable and effective advice. Learn more about our process.
Manually clearing temp files on your Mac can free up space and boost performance, but it might temporarily affect some apps until they create new cache files. That’s why I prefer MacKeeper over the manual methods for clearing temp files. It quickly and safely removes temporary files with just one click.
Here’s how to clear temp files in Mac using MacKeeper’s Safe Cleanup feature:
- Download and install MacKeeper on your Mac.
- Launch MacKeeper and go to the Safe Cleanup tab.
- Click Start Scan and wait for the results.
- Review the items you want to remove. Select them individually or click Check All.
- Next, click Clean Junk Files.
- This will clear temp files on Mac, and you’ll get a Cleaning Completed notification on your screen. Click Rescan to repeat the process.
What Else Can MacKeeper Do?
Besides clearing temporary files on Mac, MacKeeper is a great tool for cleaning junk files on your Mac, removing login items, and uninstalling unnecessary applications. Check out my detailed MacKeeper review to learn more about all its features.
Manually Clear Temp Files on Mac
I believe MacKeeper is safe, quick, and efficient in optimizing your Mac’s performance automatically, but if you prefer a more hands-on approach and want to manually clear temp files on Mac, I’ve shared the steps below.
1. Clear Web Cache Files
Web browsers store temporary data like images, cookies, and website files in a cache to enhance your browsing experience. However, these cached files can accumulate over time, leading to slow loading times and outdated content.
Clearing your browser cache on Mac regularly can resolve these issues. Below, you’ll see how to remove browser cache on Google Chrome, Safari, and Mozilla Firefox:
a. Clear Browser Cache Files on Chrome
To clear the cache on Google Chrome on Mac, you can follow these steps:
- Open Chrome and click the three vertical dots in the upper right-hand corner of the window.
- Select More Tools and then Clear browsing data from the drop-down menu.
- Select the time range you want to clear the cache in the Clear browsing data pop-up window. If you want to clear everything, select All time.
- Check the box next to Cached images and files and uncheck all other boxes unless you want to clear other types of browsing data.
- Click Clear data to clear the cache.
b. Clear Browser Cache Files on Safari
To clear Safari cache on Mac, follow these steps:
- Open Safari on your Mac, click Safari in the menu bar at the top, and select Settings from the drop-down menu.
- In the Settings window, click the Advanced tab.
- At the bottom of the Advanced tab, check the box next to the Show Develop menu in menu bar.
- You’ll see Develop in the menu bar. Click it and select Empty Caches from the drop-down menu.
c. Clear Browser Cache Files on Firefox
To clear the cache on Firefox on a Mac, follow these steps:
- Open the Firefox browser on your Mac and click the three horizontal lines (menu icon) in the top-right corner.
- Click Settings from the drop-down menu.
- In the left-hand menu, click Privacy & Security.
- Scroll to the Cookies and Site Data section and click the Clear Data button.
- In the pop-up window, check the box next to Cached Web Content. You can check the box next to Cookies and Site Data if you want to clear those as well. Then, click the Clear button to clear the cache.
2. Clear the App Cache Manually
Mac apps also have a cache that stores temporary data such as images, videos, and other files. This data improves the app’s performance and load times, but over time, the app cache can become cluttered and cause issues like freezing or crashing.
Clearing the app cache may delete some of your settings or preferences. You may need to set them up again the next time you use the app.
To clear the app cache on a Mac, follow these steps:
- Click the Finder icon in the Dock to open a Finder window.
- In the menu bar, click Go and then Go to Folder.
- In the Go to Folder window, type the following path:
~/Library/Caches/
- Select the Caches folder from the options.
- Locate the folder for the application you want to clear the cache for. If you’re not sure which folder belongs to the app, look for folders with the same name as the app.
- Right-click the folder and select Move to Bin from the menu.
- Click Empty Bin to delete the folder permanently.
3. Remove System Log Files
System log files are essential to your macOS, but these log files can accumulate over time and take up significant space on your hard drive. If left unchecked, they may affect your Mac’s performance and even cause it to crash.
So, it’s essential to remove system log files to free up disk space and keep your Mac running smoothly. There are two methods to do so:
a. Manually Deleting Log Files
You can manually delete log files by following these steps:
- Open Finder from your Dock.
- Click Go in the menu bar and select Go to Folder.
- Type the following path in the window and press Enter:
~/Library/Logs
- You’ll see a list of all your log files. To remove a file, delete the folder contents instead of dragging the folder to the Bin.
- Once you have moved the files to the Bin, right-click the Bin icon in your Dock and click Empty Bin to delete the log files permanently.
b. Using Terminal App
You can also use the Terminal app to remove system log files on your Mac. Follow the exact steps below:
Be cautious when using Terminal, as incorrect commands can cause issues with your system and always back up your data before using Terminal.
- Click the magnifying icon in the menu bar to open Spotlight search or press Command ⌘ + Spacebar.
- Type Terminal in the Spotlight search and press Enter.
- Now, enter this command and hit Enter:
sudo rm -rf /private/var/log/*
- Type your Mac’s password and let the command execute.
Using Terminal is a sensitive method, so I would still suggest using third-party apps like MacKeeper to remove the system log files and clear temp files on Mac quickly and safely.
4. Reset System Settings
As you use your Mac, you may change system settings that could cause conflicts with other apps, leading to performance issues. Resetting Mac’s system settings can resolve various issues, such as slow performance, software glitches, or problems with the user interface.
Erasing all content and settings will remove all data, settings, and user accounts from your Mac. So, I strongly suggest you back up your important Mac data before proceeding with this step.
To reset system settings on a Mac, follow these steps:
- Click the Apple icon in the top-left corner of your screen and select System Settings.
- Click General in the left sidebar and select Transfer or Reset on the right.
- Click the Erase All Content and Settings button.
- Enter your MacBook password and click Unlock.
Keep Your Mac Free From Temp Files
Now that you know how to delete temp files in Mac, you may want to optimize your Mac further to improve its performance. Here are some steps to free up space on your Mac and enhance its speed:
- Monitor your Mac’s CPU, GPU, and RAM usage to keep everything in optimal condition.
- Clear the cache files on your Mac regularly to prevent junk from piling up and slowing down your system.
- Declutter your Mac regularly by deleting unwanted files, folders, apps, and photos.