A powerful, user-friendly command-line tool that brings Windows-like disk cleanup capabilities to Ubuntu. Clean your system thoroughly with granular control over what gets removed.
Ubuntu's cleanup is scattered across multiple commands and locations. CleanUbuntu unifies everything into one simple tool:
- 🧹 All-in-one cleanup - APT cache, snap, flatpak, logs, thumbnails, and more
- 🔍 Analyze first - See what will be cleaned before doing anything
- ⚙️ Granular control - Choose exactly what to clean
- 🎯 Safe defaults - Won't break your system
- 📊 Space reporting - See how much space you're freeing
- 🚀 Fast & efficient - Comprehensive cleanup in seconds
curl -sSL https://raw.githubusercontent.com/strabo231/cleanubuntu/main/install.sh | bashwget https://raw.githubusercontent.com/strabo231/cleanubuntu/main/cleanubuntu
chmod +x cleanubuntu
sudo mv cleanubuntu /usr/local/bin/Analyze what can be cleaned:
sudo cleanubuntu --analyzeQuick cleanup:
sudo cleanubuntu --quickComprehensive cleanup:
sudo cleanubuntu --allDeep cleanup:
sudo cleanubuntu --deepCleanup Modes:
-a, --all Run all cleanup operations
-q, --quick Quick cleanup (apt + trash)
-d, --deep Deep cleanup (everything)
Specific Cleanups:
--apt Clean APT cache
--snap Clean old snap versions
--flatpak Clean unused Flatpak data
--kernels Remove old kernels
--logs Clean system logs
--cache Clean user cache
--trash Empty trash
--thumbnails Clean thumbnails
--temp Clean temp files
--browser Clean browser caches
Options:
--analyze Dry run (show what would be cleaned)
-y, --yes Skip confirmations
-h, --help Show help
-v, --version Show version
- APT Cache - Package downloads and orphaned dependencies
- Snap - Old/disabled snap versions
- Flatpak - Unused runtimes
- Old Kernels - Keeps current + 1 previous
- System Logs - Journal and old log files
- User Cache - Old cached files (30+ days)
- Trash - All users' trash
- Thumbnails - Image thumbnail cache
- Temp Files - Old temporary files
- Browser Cache - Firefox, Chrome, Chromium
✅ Requires sudo
✅ Confirmation prompts
✅ Analyze mode (dry run)
✅ Always keeps current + 1 kernel
✅ Selective cache cleaning
# Check before cleaning
sudo cleanubuntu --analyze
# Monthly maintenance
sudo cleanubuntu --all
# Emergency space recovery
sudo cleanubuntu --deep -y
# Just APT and snap
sudo cleanubuntu --apt --snapMIT License - see LICENSE
Sean - @strabo231