How to reduce the size of 'System Data' on macOS: Analysis, causes and effective solutions
20-08-2025
On macOS, the "System Data" section often generates frustration when it occupies tens or even hundreds of gigabytes without apparent explanation. This space includes caches, temporary files, update remnants, and internal data that the system needs to function. However, over time it can inflate disproportionately, affecting performance and leaving the user with little free space.
This guide exposes the most common causes behind this problem, how to diagnose them, and above all, the concrete actions that allow recovering from 20 GB to more than 90 GB in minutes.
Initial diagnosis: Where does the space go?
The first step to recover space is to measure and locate the culprits. Through a comprehensive system analysis, the heaviest directories and files on a macOS computer were identified:
- /Users: 95 GB
- /private: 72 GB
- /Applications: 14 GB
Within these paths, the critical folders were:
- /private/var/folders → 69 GB
- ~/Library/Caches → 22 GB
- ~/Library/Application Support → 25 GB
Additionally, individual large files were detected, such as the Docker virtual machine image (Docker.raw
), which occupied 60 GB.
"A single Docker file can consume more space than the entire operating system."
This data confirms that the "System Data" problem is usually related to temporary caches and development environments, rather than user files.
Main culprits of uncontrolled growth
The detailed analysis revealed three major categories:
1. System temporary caches
The /private/var/folders
directory is the epicenter of temporary files on macOS. It contains data used by Spotlight, Finder, applications, and background processes. In the case studied, it reached 69 GB.
2. Application caches
In ~/Library/Caches
, data from browsers, messaging clients, IDEs, and other programs accumulates. Although these are files that can be regenerated, their growth is constant if not cleaned periodically.
3. Development environments and tools
Development environments, like Docker, are major space consumers. In this analysis, the Docker.raw file weighed 60 GB, duplicated in two different paths.
Cleanup strategy: how to free space safely
Indiscriminate deletion of system files is not recommended. However, there are locations that can be safely cleaned because their contents regenerate automatically.
1. Delete system caches
sudo rm -rf /private/var/folders/*
This command eliminates temporary data that will regenerate upon restart. In the analyzed case, it reduced this folder from 69 GB to 2.6 GB.
2. Clean user caches
rm -rf ~/Library/Caches/*
This freed 22 GB, affecting only the initial loading speed of some applications, but without information loss.
3. Remove logs and update remnants
sudo rm -rf /private/var/log/* sudo rm -rf /Library/Updates/* sudo rm -rf /System/Volumes/Data/Library/Updates/*
These paths usually contain old files that are no longer necessary.
4. Review large consumers
Tools like Docker and environments like Xcode may require manual cleanup of images, containers, and temporary files.
Results: from a collapsed system to 97 GB free
After applying controlled cleanup:
- /private/var/folders went from 69 GB to 2.6 GB.
- ~/Library/Caches dropped from 22 GB to 1.9 MB.
- Total free space increased to 97 GB.
This result confirms that most "System Data" problems are related to temporary caches, and that periodic cleaning can prevent collapse.
Best practices to prevent it from happening again
- Schedule periodic cleanups: Automating cache deletion with a safe script is the most practical way to keep the system light.
- Control Docker and heavy environments: Use
docker system prune
to remove unused resources and avoid giant images. - Review with visual tools: Applications like GrandPerspective or custom scripts help identify anomalous growth.
- Don't touch critical folders without knowing what they do: Always confirm that the directory is regenerable before deleting it.
Automation: script to keep the system clean
As a definitive solution, a script was developed that:
- Deletes system and user caches.
- Removes logs and update remnants.
- Ignores errors and shows recovered space.
This approach allows performing cleanup with a single command and without risks to personal data.
Conclusion
The myth that "System Data" is an impossible-to-manage black box is debunked. The key is to diagnose accurately, act on appropriate directories, and avoid drastic measures like reinstalling macOS. With simple practices and automation, it's possible to maintain an agile system with space available for what really matters.