Home > How to Tips

 How to Delete Temporary Files on Mac Automatically or Manually?

Updated on Tuesday, December 3, 2024

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: In this article, you'll learn different ways to delete temporary (temp) files on Mac and the essential stuff you should know about them. To save your time and energy, you can use iBoysoft DiskGeeker to remove the temporary files on your Mac automatically.

Delete temp files on Mac

While cleaning up your Mac's hard drive, temporary files might not be the first thing that pops into your mind. Indeed, some of them are automatically deleted after a certain period, nevertheless, most are still on your Mac, silently stealing gigabytes of precious storage space and potentially slowing down your Mac.

But fear not! This guide will show you how to clear temp files on your Mac to reclaim valuable space with both automatic and manual methods.

Clean up temps files on Mac automaticallyUse iBoysoft DiskGeeker (💡Easily find and delete temp files on Mac)
Clear temp files on Mac manually1. Clear application caches
2. Delete ta emporary files in Mac Terminal
3. Delete browser caches
4. Delete the system log files
5. Delete local Time Machine snapshots
6. Restart your Mac

What are temporary files on Mac?

Temporary files, also known as temp files, are created by applications and the system itself to temporarily hold onto data for improved performance and enhanced functionality. While temporary files can be categorized broadly, they come from various sources and serve different purposes.

Here's a breakdown of some common types of temporary files on a Mac:

Browser cookiesTiny bit of data sent by the website you visit to the browser to remember your preferences, login information, and other data unique to you for better experience and convenience.
Application cacheFiles apps created to store accessed data for a faster browsing experience during revisits, saving the need for re-downloading.
Outdated system logsInformation about system activities, helpful for troubleshooting but unnecessary for daily tasks.
Old iOS backupsIf you back up your iOS devices to your Mac, the old backup files can consume a lot of space.
App installation leftoversTemporary files used during the installation process of apps which may not be deleted automatically.
Partially downloaded filesDownloaded files didn't complete successfully due to internet issues or update errors.
Intermediate document versionsTemporary backups of your work in case of sudden crashes created by apps such as Word, or Excel.
Local snapshotsTime Machine creates local snapshots of your data on your Mac's internal storage and holds them temporarily when the automatic backup is enabled and your backup disk is disconnected.

Share the different kinds of temp files on Mac with others!

 

How to find temporary files on Mac?

Temporary files are scattered across different locations on your Mac. While there's no single "temporary files" folder, the ~/Library/Caches directory is one of the most prominent places where temporary files are stored on Mac. It's the natural starting point for users looking to remove temporary files on Mac.

Other locations where temporary files may take up space include:

  • /Library/Caches: cached files for system and user applications.
  • ~/Library/Logs: logs generated by applications you install and use as your specific user.
  • /Library/Logs: logs generated by system-wide applications and processes.

Here's how to find temporary files on Mac:

  1. Open Finder.
  2. Select Go > Go to Folder from the menu bar.
  3. Type ~/Library/Caches/ or another temporary file location.
    How to find temporary files on Mac
  4. Click Go.

Spread where temporary files are located on Mac by sharing this guide.

 

Is it ok to delete temp files on Mac?

"Should temp files be deleted?" You may have this concern when freeing up space on Macintosh HD. The short answer is yes; it's generally okay to delete temp files from Mac. In fact, deleting unnecessary temporary and cache files will allow you to regain more available space and improve the overall speed of your Mac.

How to delete temp files on Mac automatically?

If you don't want to hunt down the temporary files on your Mac manually, use dedicated cleaning software - iBoysoft DiskGeeker to do the job for you. This temp file cleaner can automatically detect the junk files on your Mac, saving you time and ensuring you don't delete anything critical.

With a scan, the cleaner finds about 13GB of temporary files ready for cleaning on my MacBook Air, including cache files, log files, temporarily saved email messages, files moved to the Trash and downloaded files.

To erase temporary files on macOS Sonoma or earlier, follow these steps:

Step 1: Download and install iBoysoft DiskGeeker.

Step 2: Open the cleaning tool, select your internal data volume, and click "Clean Junk."

How to find temporary files on Mac automatically

Step 3: Wait for the scan to complete.

Step 4: Review the temporary files the tool identifies.

Step 5: Select the files you want to delete and click Clean.

How to delete temp files on Mac automatically

Share this tool to help others clean temp files on Mac automatically!

 

How to erase temporary files on Mac manually?

While automatic deleting is convenient, you can also manually clear temp files on Mac. Before proceeding with the steps, always back up your Mac in case of an accidental deletion.

Clear application caches

Regarding temporary files, cache files in ~/Library/Caches can be significant space consumers. Removing them can not only create extra room but also resolve issues when apps are not functioning properly.

To delete temporary files on a Mac with shortcuts, you can:

  1. Quit all running applications.
  2. Launch Finder.
  3. Press Cmd+Shift+G to activate the "Go to Folder" menu.
  4. Type ~/Library/Caches and press Enter.
  5. Choose the cache folders you wish to remove.
  6. Right-click on them and select "Move to Trash."
    How to clear application caches on Mac
  7. Empty the Trash.

Delete Temporary files in Mac Terminal

Alternatively, you can delete temporary files in Terminal with the following steps, as long as you can locate the temporary files or folders.

  1. Open Terminal.
  2. Run the following command to delete temporary files.rm -rf  temp_file_pathType rm -rf, leave a space, then drag and drop the temporary file into Terminal and hit Enter.
    How to delete temporary files in Terminal
  3. Delete all files in a temporary folder. (Check the files in the desired folder before taking action.)rm -rf temp_folder_path/*How to delete all files in a temporary folder in Terminal

Delete browser caches

Cleaning up browser caches is also essential to deleting temporary files on Mac. It's usually not recommended to delete cookies unless you're having trouble logging into a website or want to sign out of most sites at once.c

Empty caches in Google Chrome:

  1. Open Chrome.
  2. Click on the three vertical dots in the top right corner of the window.
  3. Select "Clear Browsing Data."
    How to delete browser caches in Chrome
  4. Choose the time range for which you want to clear the cache.
  5. Make sure the checkbox next to "Cached images and files" is selected. You can also select other items like browsing history or cookies if you desire.
  6. Click Clear data.
    How to empry caches in Safari

Clear caches in Safari:

  1. Open Safari.
  2. Select Safari > Settings.
  3. Choose the Advanced tab and tick the box next to the "Show features for web developers" option.
  4. Click the Develop menu and click "Empty Caches."

Delete the system log files

Similar to other temporary files, log files can accumulate over time and take up storage space. Luckily, most of them are safe to delete with the following steps:

  1. Open Finder and select Go > Go to Folder from the top-left menu bar.
  2. Enter ~/Library/Logs or /Library/Logs.
    How to delete system log files on Mac
  3. Select the log files you want to remove, then drag and drop them into the Trash.
  4. Empty the Trash.

Delete local Time Machine snapshots

If automatic Time Machine backup is configured on your Mac, it will create local snapshots every hour, day, or week when the backup disk is disconnected, depending on your settings. These snapshots are said to be purged after a certain time or until the space is needed.

Time Machine local snapshots taking space on Mac

However, macOS may fail to perform the cleaning, leaving you with a cluttered Mac and insufficient space, even when the available space is enough. That's why we recommend you delete old Time Machine backups when performing home cleaning for your Mac.

Restart your Mac

The simplest way to clean up temporary files on a Mac is to reboot it. This can safely delete various temporary files like caches, logs, or unsaved documents. It's especially helpful if you haven't restarted your Mac for a long time.

Otherwise, you can boot into macOS Safe Mode to clear the cached data and other files of the user account you logged into. This troubleshooting mode also checks the file system for errors. Then simply restart normally.

Hopefully, you've learned how to delete temp files on Mac to free up space in this guide. If you find it useful, share it with others.