Understanding System Data Storage on macOS
Mac System Data can sometimes consume an abnormal amount of space. When your System Data displays 190GB, the primary culprits are typically system caches, logs, temporary files, Time Machine snapshots, iOS backups, and hidden files generated by large applications. Whilst these contents are not directly visible in Finder, they can continuously expand and occupy substantial hard drive space.
Common Sources of System Data
System Data accumulation comes from several key areas:
- System and Application Caches: Large amounts of cached data stored in
/Library/Cachesand~/Library/Cachesdirectories. - Logs and Temporary Files: Located in directories such as
/Library/Logs,~/Library/Logs, and/private/var/log. - iOS Device Backups: Complete backups of your iPhone or iPad stored locally on your Mac.
- Virtual Machine Images: Large files from VMware or VirtualBox installations.
- Development Environment Files: Intermediate files generated by Xcode and other development tools.
- Local Snapshots and Time Machine Remnants: These can typically be cleaned using Disk Utility or terminal commands such as
tmutil thinlocalsnapshots / 999999999999999.
Cleaning and Optimisation Methods
Manual Cleaning Approaches
Clear Caches and Logs
Use Finder's "Go to Folder" function to access the following locations and move unnecessary content to the Bin:
~/Library/Caches~/Library/Logs
Check and Delete Local Snapshots
- Launch Disk Utility
- From the menu bar, select "View APFS Snapshots"
- Manually delete snapshots that are no longer needed
Uninstall Unused and Large Applications
Remove virtual machine images, Xcode, or Docker-related files. Simply deleting the application may not be sufficient; you'll need to manually remove residual data as well.
Use Third-Party Cleaning Tools
Applications like CleanMyMac X can perform deep cleaning of system rubbish, caches, logs, and hidden large files. These tools are typically more thorough and safer than manual operations.
Empty Bin and Downloads Folder
Regularly optimise storage settings, including enabling "Optimise Storage" and "Empty Bin Automatically" options in System Preferences.
Practical Operation Paths
To manually clean system files:
-
Open Finder and press
Shift+Command+G -
Enter the following paths one by one to clean:
~/Library/Caches~/Library/Logs
-
For cleaning large files and unused applications, check these common directories:
~/Downloads~/Movies~/Documents
-
Recommended third-party tool:
- CleanMyMac X (recommended for deep cleaning and large file detection)
Cleaning System Data Using Terminal Commands
You can delete caches, logs, temporary files, and residual snapshots in Mac's System Data through terminal commands. However, it's advisable to proceed step by step to avoid accidentally deleting important system files. Below are commonly used terminal commands to help you perform a deep clean of system space.
Clearing Cache Files
sudo rm -rf ~/Library/Caches/*
These commands clear user-level and system-level caches respectively.
Deleting Logs and Temporary Files
sudo rm -rf ~/Library/Logs/*
sudo rm -rf /private/var/log/*
sudo rm -rf /private/var/tmp/*
The above commands clean user and system logs and temporary files.
Clearing Local Time Machine Snapshots
tmutil listlocalsnapshots /
tmutil deletelocalsnapshots <snapshot_name>
# Or batch delete
tmutil thinlocalsnapshots / 999999999999999
This can delete local backup snapshots on the disc, freeing up hidden space.
Finding and Deleting Large Files
sudo find / -type f -size +500M
# After finding large files, use
sudo rm <file_path>
Use this command to locate and delete large hidden files.
Important Precautions
When using terminal commands to clean System Data, keep these critical points in mind:
- All
sudocommands require entering your administrator password - It's recommended to back up important data before cleaning to avoid accidental deletion that could prevent the system or programmes from running normally
- Do not delete unclear critical files in directories such as
/System,/Library, or/usr. Only clean caches, logs, snapshots, and other data unrelated to core functionality
These commands can effectively free up space occupied by System Data, but each step must be executed carefully to avoid damaging the system environment.
Final Recommendations
The substantial "System Data" is generated by macOS's underlying file system and third-party applications. Do not randomly delete unknown system folders. Prioritise cleaning caches, logs, and snapshots, and when necessary, uninstall unnecessary large software and backups. In extreme cases, consider backing up important data and reinstalling the system for a complete reset.