Delete Junk Files on macOS
Junk files are unnecessary files produced by the operating system or software. Junk files keep increasing, but our computer disks are limited. So we need to delete junk files regularly. Otherwise, we may not have enough free space to use.
In this post, I will guide you to delete junk files on macOS.
Delete OS and Third-Party Software Leftovers
JetBrains
Remove JetBrains old version leftovers
- Open the JetBrains Toolbox App.
- Navigate to Settings: Click the gear icon in the upper right corner.
- Go to the “Tools” section: Expand the “Tools” section.
- Find “Clean up leftover tool directories”
HomeBrew
1. Clear outdated or unused packages and downloads from Homebrew
Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae:
brew cleanup |
2. Remove unused dependencies
Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed:
brew autoremove |
Delete Software Cache Files
Docker
1. Remove all unused containers, networks, images (both dangling and unused), and optionally, volumes.
docker system prune |
What is does:
- Removes all stopped containers.
- Removes all unused networks.
- Removes all dangling images (images that are not tagged and not referenced by any container).
- Removes all build cache.
2. Remove Docker images on Docker Desktop
Remove Docker images that you no longer need on Docker Desktop.