Other

Cleaning Temporary Files on macOS: Free Up Space Quickly

Temporary files on macOS accumulate over time and can take up dozens of gigabytes. This guide will show you how to find and delete them manually via Finder and Terminal, as well as using built-in macOS tools.

Updated at February 16, 2026
10-15 min
Easy
FixPedia Team
Применимо к:macOS Sonoma 14macOS Ventura 13macOS Monterey 12macOS Big Sur 11

Introduction / Why This Is Needed

Over time, macOS accumulates temporary files, application caches, and logs that can occupy anywhere from several gigabytes to tens of gigabytes of disk space. These files are not critical for system operation, but their accumulation slows down searches, can cause "Not Enough Space" errors, and reduces overall performance. In this guide, you will learn how to safely find and remove temporary data manually and using built-in tools, reclaiming precious gigabytes.

Requirements / Preparation

  • macOS Version: Instructions are current for macOS Sonoma (14), Ventura (13), Monterey (12), and Big Sur (11).
  • Access Permissions: Deleting system temporary files (/private/var/tmp) requires administrator privileges (password).
  • Pre-installed Packages: Terminal is available by default. Some steps will require the Safari or Google Chrome browser.
  • Recommendation: Before starting, ensure you have access to a backup (Time Machine or another) in case of accidental deletion of important data. Close all browsers and active applications (e.g., Photoshop, Xcode), as they may lock their cache files.

Step-by-Step Instructions

Step 1: Preparation: Create a Backup and Close Applications

Before cleaning, ensure all important data is saved. Close all browsers and active applications to avoid file access errors during deletion. This will also prevent caches from being recreated immediately after clearing.

Step 2: Clearing User Caches via Finder

This is the safest and most controlled method.

  1. In Finder, click the menu "Go""Go to Folder..." (or Cmd+Shift+G).
  2. Enter the path: ~/Library/Caches and click "Go".
  3. You will see dozens of folders named after application domain identifiers (e.g., com.apple.Safari, com.google.Chrome, com.adobe.Photoshop).
  4. Open each folder and delete all its contents (files and subfolders). Do not delete the folders themselves, as applications will recreate them upon next launch.
  5. Repeat for all folders you wish to clear. Pay special attention to browser folders and heavy applications (e.g., com.spotify.client, com.plexapp.plex-media-player).

💡 Tip: If the Caches folder seems huge, you can simply move it to the Trash (right-click → "Move to Trash"), then create an empty folder with the same name. However, the method of deleting contents is more precise.

Step 3: Deleting System Temporary Files via Terminal

System temporary files are stored in /private/var/tmp and /tmp.

  1. Open Terminal (from /Applications/Utilities/ or via Spotlight Cmd+Space).
  2. Enter the following command to clear the main system temporary directory:
    sudo rm -rf /private/var/tmp/*
    
  3. The system will prompt for the administrator password. Enter it (characters are not displayed) and press Enter.
  4. The /tmp folder (which is often a symbolic link to /private/tmp) is already cleared by the command above. Additional cleanup is usually not required.

⚠️ Important: The rm -rf command deletes files permanently. Ensure you have entered the path correctly. Do not use sudo rm -rf / or sudo rm -rf ~ — this will lead to catastrophic consequences.

Step 4: Clearing Browser Caches (Safari and Chrome)

For Safari:

  1. Launch Safari.
  2. From the menu, select "Safari""Settings" (or Cmd+,).
  3. Go to the "Advanced" tab.
  4. At the bottom of the window, click the "Show Develop menu in menu bar" checkbox if it's not already enabled.
  5. Now, in the menu bar, select "Develop""Empty Caches".

For Google Chrome:

  1. Launch Chrome.
  2. In the address bar, type: chrome://settings/clearBrowserData and press Enter.
  3. In the window that opens, select "Cached images and files" (uncheck other items if you only want to clear the cache).
  4. In the dropdown menu "Time range", select "All time".
  5. Click "Clear data".

Step 5: Freeing Up Space with macOS's Built-in Utility

macOS provides a convenient storage analyzer.

  1. Click the Apple logo (☰) in the top-left corner → "About This Mac".
  2. Go to the "Storage" tab (or "Storage Management" button).
  3. The system will calculate and suggest several categories for cleanup: "Recommendations" (e.g., "Automatically empty Trash"), "Documents", "Trash".
  4. Click "Manage..." or follow the prompts (e.g., "Store in iCloud", "Optimize Storage", "Empty Trash").
  5. This utility will also show which applications occupy the most space, helping you decide what to remove.

Step 6: Checking the Result and Final Cleanup

  1. Return to "About This Mac""Storage" and see how much space has been freed.
  2. If you used Terminal, check the size of the /private/var/tmp folder:
    du -sh /private/var/tmp
    
    The command will show the current size.
  3. Don't forget to empty the Trash (right-click on the Trash icon in the Dock → "Empty Trash").
  4. Restart your Mac. This will terminate background processes that may have been using temporary files and free associated resources.

Verifying the Result

The primary indicator of success is increased free disk space in the "About This Mac" → "Storage" section. You should see an increase of several gigabytes (the exact amount depends on how long it's been since your last cleanup and how many applications you use).

Additionally, you can verify that cache folders are indeed empty:

ls -la ~/Library/Caches/com.apple.Safari/

If the output shows only . and .. (or is completely empty), the folder has been cleared.

Potential Issues

  • "Operation not permitted" error when deleting via Finder: A file is in use by a running application. Close the corresponding application and try again.
  • Not enough space to complete the operation: Sometimes, the system requires temporary free space to delete large volumes of temporary files. Free up space by other means (e.g., delete old downloads) and retry.
  • Cache folders refill instantly: This is normal. Applications begin creating new cache files upon first launch after clearing. Regular (every 1-2 months) manual cleanup is the optimal strategy.
  • System "hangs" after sudo rm -rf command: If you accidentally entered an incorrect path (e.g., / instead of /private/var/tmp), this could lead to deletion of system files. In such a case, a macOS reinstallation will be required. Be extremely careful when using sudo rm -rf.

F.A.Q.

Is it safe to delete everything in the /tmp folder on Mac?
Can you delete all browser caches with one command?
What to do if space isn't freed after cleanup?
Do you need to restart Mac after cleanup?

Hints

Preparation: create a backup and close applications
Cleaning user caches via Finder
Deleting system temporary files via Terminal
Cleaning browser cache (Safari and Chrome)
Freeing up space with built-in macOS utility
Checking results and final cleanup

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community