Safe files to clean up on Mac, Windows and Linux (and what to leave alone)
The rule is the same on every system: delete what the system or the app can rebuild, use the system's own tool for anything it manages, and do not touch anything with your data in it. Here are the places, by operating system.
macOS
| Where | What it is | Verdict |
|---|---|---|
~/Library/Caches | App caches | Safe. Apps rebuild them. Quit the app first. |
~/Library/Logs, /Library/Logs | Logs | Safe |
~/Library/Developer/Xcode/DerivedData | Xcode build output | Safe |
~/Library/Application Support/MobileSync/Backup | iPhone and iPad backups | Delete old ones you will never restore, in Finder's device page |
| Trash, Downloads | Things you chose to remove or never opened | Safe once you look |
| Local Time Machine snapshots | Space the Mac frees itself when needed | Leave; remove with tmutil only if you must |
~/Library/Containers, ~/Library/Mail, Photos library | Your app data, mail and pictures | Do not delete by hand |
/System, /private/var/db | System | Never |
Windows
| Where | What it is | Verdict |
|---|---|---|
%TEMP%, C:\Windows\Temp | Temporary files | Safe. Skip files in use. |
| Settings, System, Storage, Temporary files | Update leftovers, thumbnails, Delivery Optimization | Safe, use that screen |
C:\Windows.old | The previous Windows version after an upgrade | Safe to remove through Settings or Disk Cleanup; Windows also removes it by itself after about ten days |
C:\Windows\SoftwareDistribution\Download | Downloaded updates | Safe when no update is installing |
C:\Windows\WinSxS | The component store | Never delete by hand. Use DISM /Online /Cleanup-Image /StartComponentCleanup |
hiberfil.sys | Hibernation file | powercfg /h off removes it if you never hibernate (it also turns off Fast Startup) |
pagefile.sys, swapfile.sys | Virtual memory | Leave |
System Volume Information | Restore points and shadow copies | Manage in System Protection settings |
%LocalAppData% caches (browsers, Teams, Discord) | App caches | Safe through each app's settings |
Linux
| Where | What it is | Verdict |
|---|---|---|
~/.cache | App caches | Safe |
/var/cache/apt | Downloaded packages | sudo apt clean |
| Unused packages | Left over after upgrades | sudo apt autoremove |
/var/log/journal | systemd logs | sudo journalctl --vacuum-time=2weeks or --vacuum-size=500M |
| Snap | Old revisions of each snap | sudo snap set system refresh.retain=2, then remove disabled revisions |
| Flatpak | Unused runtimes | flatpak uninstall --unused |
/var/crash, ~/.local/share/Trash | Crash reports, trash | Safe |
/var/lib/docker | Docker images and volumes | Use docker system prune, not rm |
/etc, /var/lib, /boot | Configuration, state, kernel | Do not delete by hand |
The checks that save you
- Look at a folder's size before you delete it. See why your Mac's disk is full for how.
- Move first, delete later: use the Trash or Recycle Bin and empty it a week on.
- If a path is not in the table, search for it before removing. A folder with a strange name is often an app's only copy of your work.
Where Zofle fits. Zofle is a free disk cleanup and file finder for Mac and Windows. It shows what is filling a disk, folder by folder, lists developer caches, old build folders and leftovers with their size and date, lets you untick what you want to keep, and sends the rest to the Trash or Recycle Bin first so you can undo it.
Sources and method
- Apple Support: Free up storage space on Mac.
- Microsoft Support: Free up drive space in Windows; Microsoft Learn: Clean up the WinSxS folder.
- Ubuntu documentation: apt, journalctl and snap manual pages.
- Paths and commands are from each tool's own documentation and can differ by version; run the 'find it' command on your own machine before deleting anything.
Zofle Pro news
People signing up now will get Zofle Pro, with more features, for free when we launch it.