A powerful command-line utility to clean junk files and cache on macOS.
- Scan Mode: Identify junk files without removing them
- Cache Cleaning: Remove system and user cache files
- DS_Store Cleanup: Find and remove all .DS_Store files
- Temporary Files: Clean temporary and old downloaded files
- System Maintenance: Run macOS daily, weekly, and monthly maintenance scripts
Download the latest release for your platform from the releases page.
git clone https://github.com/cdigiuseppe/mcleaner.git
cd mcleaner
make buildgo install github.com/cdigiuseppe/mcleaner@latest# Scan for junk files (no removal)
mcleaner scan
# Clean system cache
mcleaner clean-cache
# Remove all .DS_Store files
mcleaner clean-dsstore
# Clean temporary files
mcleaner clean-temp# Run daily maintenance
mcleaner maintenance daily
# Run weekly maintenance
mcleaner maintenance weekly
# Run monthly maintenance
mcleaner maintenance monthly# Show general help
mcleaner --help
# Show command-specific help
mcleaner scan --helpPerforms a comprehensive scan of your system to identify:
- Cache files in system and user directories
- .DS_Store files throughout the filesystem
- Temporary files and old downloads
- Reports total recoverable space
Removes cache files from:
~/Library/Caches/Library/Caches/tmp
Recursively finds and removes all .DS_Store files starting from your home directory.
Removes temporary files including:
- Files with
.tmpand.tempextensions - Files containing "temp" in the name
- Old installer files in Downloads (older than 30 days)
Runs macOS system maintenance scripts:
- daily: Runs daily periodic scripts
- weekly: Runs weekly periodic scripts
- monthly: Runs monthly periodic scripts
Note: Maintenance commands require sudo privileges.
- Go 1.21 or later
- Make (optional, for using Makefile)
# Build for current platform
make build
# Build for all platforms
make build-all
# Run tests
make test
# Run all checks (format, vet, lint, test)
make checkmake help # Show all available targets- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
To create a new release:
- Ensure all changes are committed
- Run
make releaseand enter the version tag (e.g.,v1.0.0) - The GitHub Actions workflow will automatically build and publish the release
This project is licensed under the MIT License - see the LICENSE.md file for details.
This tool modifies and deletes files on your system. While it targets known safe-to-remove locations, always:
- Run
scanfirst to see what would be removed - Backup important data before running cleanup commands
- Test on a non-production system first
- ✅ macOS Intel (amd64)
- ✅ macOS Apple Silicon (arm64)
Note: This tool is specifically designed for macOS only.