In this article you will find the following:
Temporary files aren’t the first thing that comes to mind when you decide to clean up your Mac. Often overlooked, they may waste GBs of precious disk space. Hence, to help you, our today’s piece will talk about what’s behind temporary files and how to delete them effectively.
We’ll show you a number of ways to clear temp files on Mac—both manually and automatically. So, if you’re low on storage space, continue reading to know how to safely and simply make room for other content and improve the speed and stability of your MacBook.
Before we start
One of the easiest ways to delete temp files on Mac is to use MacKeeper's Safe Cleanup. This powerful utility finds all the unnecessary junk that’s hiding on your machine, and then safely removes it in just a few clicks.
Here’s how to use it:
- Download MacKeeper and install the app.
- When MacKeeper opens, select the Safe Cleanup tool.
- Click Start Scan to find all the temporary and junk files on your Mac.
- Select the items you want to delete, then click Clean Junk Files.
What are temporary files on Mac?
Temporary files mostly come in the form of cache and log files, and they’re often created by apps and web browsers. Their main purpose is to hold onto data temporarily so that it doesn’t get lost, and to improve the performance of certain apps—especially web browsers—by making certain content readily available.
Although temporary files are useful, they can build up over time, especially if you’re a heavy Mac user. They not only eat up your machine’s storage space, but they can also impact performance, making your Mac feel sluggish.
Types of temp files
Before you start to empty temporary files on Mac, it’s a good idea to learn the differences between the various types. This will help you decide which temp files you want and which ones you don’t. Also, knowing this, you won’t erase temp files that certain apps need to function properly.
Here are the most common types of temp files:
- Browser cookies
- Application cache
- Outdated system logs
- Downloaded files
- Old iOS backup files
- Intermediate document versions
1. Browser cookies
These are some of the most common temporary files, and every Mac user who has ever visited a website will have them. They’re used to holding onto data that’s unique to you, such as your shopping cart, your site preferences, and your login information if you choose to save it.
2. Application cache
Caching is the process of storing pieces of data so that it’s easy to access and doesn’t get lost. Applications create these files to hold onto information until it’s saved permanently, and to save online data—such as images—so that they don’t have to be downloaded every time they’re needed.
3. Outdated system logs
System logs collect key information about your Mac as you use it. They can tell you what’s been happening on your system, helping you identify problems when it becomes unstable, or certain functions aren’t operating as they should be.
4. Downloaded files
Some downloaded files may be ones you need to hold onto, but others aren’t necessary after a short period of time. For instance, if you download an app, its installation package is no longer required once the software has been installed.
5. Old iOS backup files
If you prefer to back up your iPhone or iPad to your Mac, rather than to iCloud, those backup files can sit collecting digital dust until you erase them. They take up a lot of space, and in many cases, it’s not necessary to keep older backups that contain outdated data.
6. Intermediate document versions
Have you ever wondered how changes you make to a document are still there even after the application you’re working on crashes? That’s because many apps hold this data, as well as many other versions of a document, in a temporary file so that it doesn’t get lost before you get a chance to save it permanently.
How to find the main temporary folder on your Mac
Let’s locate the folder with temporary files on your Mac. It’s called the Caches folder and contains all temporary files along with the cached ones. Here’s the quickest way to get to it:
- Open Finder, then select Go > Go to Folder in the menu bar.
- Type ~/Library/Caches/ then press enter.
Note from our experts: Before you delete any temporary files from your Mac, you should spend some time looking into what they do so that you don’t wipe anything that’s important. If you’re unsure, you can start by deleting browser cache files, which are always safe to remove.
Via Terminal
Your Mac also stores a DNS cache, which is a record of all websites you’ve visited on your laptop. It can help make your browser faster, but it builds up over time and sometimes needs to be cleared in Terminal like so:
- Open Terminal from inside the Other folder in Launchpad.
- Type sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed.
- Hit Enter, then enter your system password if prompted.
How to delete temporary files on Mac
When you need to clear system storage on Mac, there are a number of methods you can use that will effectively remove temporary files and give you more space. You can either delete log and cache files from the Caches folder (using the method outlined above) or try one of these options:
- Remove temporary files with MacKeeper
- Clear application cache
- Clear browser cache
- Delete the system log files
- Restart your Mac
1. Remove temporary files with MacKeeper
Deleting temporary files manually is a time-eater. This is when MacKeeper comes into play. How much do you think it’d take to have the Safe Cleanup feature in MacKeeper detect and clear temp files? Just a few clicks within a few minutes:
- Launch MacKeeper and go to the Safe Cleanup tab.
- Click Start Scan and then wait for the scan results.
- Review the files found and select those you want to erase.
- Click Clean Junk Files.
2. Clear application cache
Cache files created by applications live in the Caches folder that we found earlier. Clearing them after a buildup can not only free up space, but it can also help resolve issues with apps that aren’t functioning correctly. Here’s how to delete them:
- Quit all active apps. This will prevent them from becoming unstable as you delete temporary files they might be using.
- In the Caches folder, select all the files you want to delete. Right-click, then select Move to Trash.
- Empty the Trash to delete the files from your Mac.
3. Clear browser cache
Clearing browser cache files can not only fix issues with your browser, but it’s one of the safest ways to free up space since the files don’t contain any critical data that your browser needs to operate correctly. Removing them only resets any site preferences or credentials you’ve saved.
Each browser has a different method for clearing its cache, so follow the steps for the one you’re using:
- 3.1 Delete cache in Safari
- 3.2 Empty cache in Chrome
- 3.3 Clean cache in Firefox
- 3.4 Delete cache in Opera
3.1 Delete cache in Safari
Safari is the default web browser on Mac, so it tends to be the one that most OS X users stick with. Here’s how to clear cache files in Safari:
- Open Safari, then click Safari > Settings in the menu bar.
- Select the Privacy tab, then click Manage Website Data.
- Click the Remove All button to clear cache files for all websites, then click Remove Now to confirm.
3.2 Empty cache in Chrome
Google Chrome is known for suffering from slowdowns over time, and clearing its cache files can help. Here’s how to do it:
- In Chrome, click on the three dots in the top-right corner to open the menu.
- Click Settings, then select Privacy and security.
- Select Clear browsing data, then choose the files you want to delete. Cookies and cached images take up the most space, so it’s recommended you clear these first.
- Click the Clear data button.
3.3 Clean cache in Firefox
If you’re having issues with websites in Firefox, or you simply need to clear some other storage on Mac, deleting cache files is a great place to start. Here’s how to clean the cache in Firefox:
- Open Firefox and select the three lines in the top-right corner to open its menu.
- Click Settings, then navigate to Privacy & Security.
- Select Clear Data, then choose the files you want to delete.
- Click the Clear button.
3.4 Delete cache in Opera
Just like any other browser, Opera also collects cache files for the websites you visit, and these build up over time, taking up storage space. To clear those files, follow these steps:
- In Opera, click the three lines in the top-right corner to open the menu.
- Scroll down to Privacy & Security, then click the Clear button alongside Browsing data.
- Select the files you want to delete, then click Clear data.
4. Delete the system log files
Like other temporary data, system log files build up over time and take up storage space. Fortunately, most of them can be safely deleted, but some system logs live in restricted folders—indicated by a red icon—that cannot and shouldn’t be removed. For all the others, there are two easy ways to get rid of them:
4.1 Via Finder
System log files are stored in a number of different places on your Mac, including:
- /Library/Logs
- /Users/UserName/Library/Logs
- /private/var/log
Here’s how to navigate to those folders and then remove the log files within them:
- Open Finder, then select Go > Go to Folder in the menu bar.
- Enter the directory of one of the folders listed above.
- Select the files you want to remove. Right-click, then select Move to Trash.
- Empty the Trash to wipe the files from your Mac.
4.2 Using Terminal
To delete files on Mac using Terminal, follow these steps:
- Open Terminal.
- Enter the rmdir command, followed by the location of the log folder you want to delete.
- Press Enter to delete the folder you entered.
Hint from our team: Deleting folders with Terminal using this method can be dangerous. The data is immediately removed rather than sent to the Trash can, so there’s no way to recover it if you accidentally delete something you shouldn’t. We recommend you avoid this method if you’re not sure what you’re doing.
5. Restart your Mac
Did you know that restarting your Mac clears a lot of the temporary files that build up while you’re using the machine? It’s one of the simplest ways to delete those files and fix any issues you may be encountering—just follow these instructions:
- Click the Apple icon in your Mac’s menu bar.
- Select Restart, then click the Restart button to confirm.
Summing up
It doesn’t matter which way you choose—automatic or manual—removing temporary files is what macOS Catalina, Monterey, and later versions of the OS need regularly. Too many temporary files may result in your Mac performing not the way you expect it to.
One of the safest and most effective ways to clear temporary files and clear other hidden junk is with MacKeeper’s Safe Cleanup tool. In addition to deleting cache and log files, it can get rid of unused language packs, old Mail attachments, and other data to free up storage space.