Skip to content

A powerful, user-friendly command-line tool that brings Windows-like disk cleanup capabilities to Ubuntu.

License

Notifications You must be signed in to change notification settings

strabo231/CleanUbuntu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests

CleanUbuntu - Comprehensive System Cleanup Utility

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.

Why CleanUbuntu?

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

Installation

Quick Install

curl -sSL https://raw.githubusercontent.com/strabo231/cleanubuntu/main/install.sh | bash

Manual Install

wget https://raw.githubusercontent.com/strabo231/cleanubuntu/main/cleanubuntu
chmod +x cleanubuntu
sudo mv cleanubuntu /usr/local/bin/

Usage

Analyze what can be cleaned:

sudo cleanubuntu --analyze

Quick cleanup:

sudo cleanubuntu --quick

Comprehensive cleanup:

sudo cleanubuntu --all

Deep cleanup:

sudo cleanubuntu --deep

Command Reference

Cleanup 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

What Gets Cleaned?

  • 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

Safety Features

✅ Requires sudo
✅ Confirmation prompts
✅ Analyze mode (dry run)
✅ Always keeps current + 1 kernel
✅ Selective cache cleaning

Examples

# 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 --snap

License

MIT License - see LICENSE

Author

Sean - @strabo231

About

A powerful, user-friendly command-line tool that brings Windows-like disk cleanup capabilities to Ubuntu.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages