How to Delete Temporary Files on Mac

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:

  1. Download MacKeeper and install the app.
  2. When MacKeeper opens, select the Safe Cleanup tool.
  3. Click Start Scan to find all the temporary and junk files on your Mac.
  4. 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:

  1. Browser cookies
  2. Application cache
  3. Outdated system logs
  4. Downloaded files
  5. Old iOS backup files
  6. 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:

  1. Open Finder, then select Go > Go to Folder in the menu bar.
  2. Type ~/Library/Caches/ then press enter.
Finder on Mac shows the Go menu. Click Go to Folder to enter the location of the temporary Caches folder.
Step 1. In Finder, click Go > Go to Folder
Finder on Mac shows the Go to Folder text box. Enter the location of a the Caches folder, then press enter.
Step 2. Enter ~/Library/Caches and 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:

  1. Open Terminal from inside the Other folder in Launchpad.
  2. Type sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed.
  3. Hit Enter, then enter your system password if prompted.
Launchpad on Mac shows the Other folder. Double click Terminal to open it.
Step 1. Open Terminal from the Other folder in Launchpad
Terminal on Mac shows the command for deleting the DNS cache. After entering the command, press enter.
Step 2. Enter the command in the image, then press enter

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:

  1. Remove temporary files with MacKeeper
  2. Clear application cache
  3. Clear browser cache
  4. Delete the system log files
  5. 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:

  1. Launch MacKeeper and go to the Safe Cleanup tab.
  2. Click Start Scan and then wait for the scan results.
  3. Review the files found and select those you want to erase.
  4. Click Clean Junk Files.
MacKeeper on Mac shows the Safe Cleanup tool. Click Start Scan to find all temporary files and hidden junk.
Step 1. Select Safe Cleanup, then click Start Scan
MacKeeper on Mac shows the Safe Cleanup tool. After running a scan, select the temporary files you want to delete, then click Clean Junk Files.
Step 2. Select the files to delete, then 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:

  1. Quit all active apps. This will prevent them from becoming unstable as you delete temporary files they might be using.
  2. In the Caches folder, select all the files you want to delete. Right-click, then select Move to Trash.
  3. Empty the Trash to delete the files from your Mac.
The Dock menu on Mac shows all options. Click Quit to close an active application.
Step 1. Quit all active apps
Finder on Mac shows the Caches folder where all temporary log files are held. Select any files you want to delete.
Step 2. Select all the files you want to delete
Finder on Mac shows the Caches folder where all temporary log files are held. After selecting files you want to delete, right-click, then select Move to Trash.
Step 3. Right-click, then select Move to Trash

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

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:

  1. Open Safari, then click Safari > Settings in the menu bar.
  2. Select the Privacy tab, then click Manage Website Data.
  3. Click the Remove All button to clear cache files for all websites, then click Remove Now to confirm.
The Safari menu on Mac shows all available options. Click Settings to clear temporary cache files from Safari.
Step 1. Click Safari, then Settings
The Safari settings menu on Mac shows the Privacy section. Click Manage Website Data to view all cache files.
Step 2. In Privacy, click Manage Website Data
The Safari settings menu on Mac shows all cache files stores on your machine. Click Remove All to delete them.
Step 3. Click the Remove All button
Safari on Mac shows the confirmation prompt for deleting all website data. Click Remove Now to wipe all temporary cache files.
Step 4. 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:

  1. In Chrome, click on the three dots in the top-right corner to open the menu.
  2. Click Settings, then select Privacy and security.
  3. 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.
  4. Click the Clear data button.
Chrome on Mac shows the menu. Click Settings to access more options.
Step 1. Open the Chrome menu, then click Settings
Chrome on Mac shows the Settings menu. Click Privacy and security then Clear browsing data to remove temporary cache files.
Step 2. In Privacy and security, click Clear browsing data
Chrome on Mac shows the Clear browsing data menu. Select the files you want to delete, then click Clear data.
Step 3. Select the data to remove, then select Clear data

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:

  1. Open Firefox and select the three lines in the top-right corner to open its menu.
  2. Click Settings, then navigate to Privacy & Security.
  3. Select Clear Data, then choose the files you want to delete.
  4. Click the Clear button.
Firefox on Mac shows the options menu. Click Settings to access more preferences.
Step 1. In the Firefox menu, click Settings
Firefox on Mac shows the Settings page. Click Privacy & Security to clear temporary cache files.
Step 2. Go to Privacy & Security
Firefox on Mac shows the Privacy & Security menu. Under Cookies and Site Data, click Clear Data to remove cache files.
Step 3. Click Clear Data
Firefox on Mac shows the Clear Data menu. Select the temporary files you want to delete, then click Clear.
Step 4. Select the data you want to remove, then click Clear

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:

  1. In Opera, click the three lines in the top-right corner to open the menu.
  2. Scroll down to Privacy & Security, then click the Clear button alongside Browsing data.
  3. Select the files you want to delete, then click Clear data.
Opera on Mac shows the main window with the options button. Click the button to access the settings menu.
Step 1. Open the Opera menu
Opera on Mac shows the settings menu. Under Privacy & Security, click the Clear button to remove cache files.
Step 2. Under Privacy & Security, click Clear
Opera on Mac shows the Clear browsing data window. Select the data you want to remove, then click the Clear data button to delete it.
Step 3. Select the data 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:

  1. Open Finder, then select Go > Go to Folder in the menu bar.
  2. Enter the directory of one of the folders listed above.
  3. Select the files you want to remove. Right-click, then select Move to Trash.
  4. Empty the Trash to wipe the files from your Mac.
Finder on Mac shows the Go menu. Click Go to Folder to enter the location of a logs folder.
Step 1. In Finder, click Go > Go to Folder
Finder on Mac shows the Go to Folder text box. Enter the location of a logs folder you want to go to, then press enter.
Step 2. Enter the path of a log folder, then hit enter
Finder on Mac shows the Logs folder. Right-click a file you want to delete, then click Move to Trash.
Step 3. Right-click a file you want to delete > Move to Trash

4.2 Using Terminal

To delete files on Mac using Terminal, follow these steps:

  1. Open Terminal.
  2. Enter the rmdir command, followed by the location of the log folder you want to delete.
  3. Press Enter to delete the folder you entered.
Terminal on Mac shows the rmdir command for deleting a directory. Enter the path of a logs folder you want to delete, then press enter.
Step 1. In Terminal, enter the rmdir command
Terminal on Mac shows the rmdir command for deleting a directory. Enter the path of a logs folder you want to delete, then press enter.
Step 2. Enter the path of a folder to delete, then hit enter

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:

  1. Click the Apple icon in your Mac’s menu bar.
  2. Select Restart, then click the Restart button to confirm.
The Apple menu on Mac shows all system options. Click Restart to restart your computer.
Step 1. In the Apple menu, click Restart
macOS shows the restart prompt. Click Restart to proceed with restarting your Mac.
Step 2. Click Restart 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.

Use your Mac to the fullest! Sign up and get:
Effective tips on how to fix Mac issues
Reliable advice on how to stay safe online
Mac-world news and updates

Thank you!

You’ll love exploring your Mac with us.

Oops, something went wrong.

Try again or reload a page.

Here’s another sign you need to upgrade your macOS ASAP:

30% off your MacKeeper subscription

Сopy the code now and use it in the MacKeeper checkout after the upgrade.

Copy Code

Please be aware that this code cannot be combined with any other discounts, offers, or promotions.

Contents

Unlocked

Mac working slowly? Feel the benefit of removing digital junk.

Start Now
PC

MacKeeper - your all-in-one solution for more space and maximum security.

Try Now

Read more

Clear Cache on Mac Ventura
Clear Cache on Mac Ventura
How to Speed Up Mac High Sierra
How to Speed Up Mac High Sierra
arrow

Run Application

step_1

Click Continue

step_2

Click Install

step_1

Your macOS version is lower than OS 10.11. We’d like to offer you MacKeeper 4 to solve the cleaning, privacy, and security issues of your macOS.