Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Junk Cleaner

Clean up unnecessary files and free up disk space on Linux (Ubuntu/Debian).

Before you start: This script removes files. Always review what it will do first using --dry-run, and keep backups just in case.

What It Cleans

  • Installer cache – old packages you don't need anymore
  • System logs – takes up space over time
  • Temporary caches – browser cache, thumbnails, app temp files
  • Unused apps – old versions from Snap
  • Your trash bin – permanently empties it
  • Developer caches – pip and npm if you code
  • Docker junk – unused containers, images, volumes

You get a report before and after showing how much space you freed up.

What You Need

  • Ubuntu, Debian, or similar Linux (APT-based)
  • sudo access (to remove system stuff)

Quick start

git clone https://github.com/opbot-xd/linux-junk-cleaner.git
cd linux-junk-cleaner
chmod +x linux-cleanup.sh
./linux-cleanup.sh --dry-run

How to Use

First time? Start here:

./linux-cleanup.sh --dry-run    # See what it will clean, don't actually do it

Ready to clean?

./linux-cleanup.sh              # Interactive: review each step and confirm

Just do it all (if you trust me):

./linux-cleanup.sh --all        # Run everything automatically

Skip something you don't want cleaned:

./linux-cleanup.sh --no-trash --no-snap    # Skip trash and Snap cleanup

What Gets Cleaned (In Detail)

  • Installer cache – leftover .deb files
  • Unused packages – stuff you installed but don't use anymore
  • System logs – keep the recent ones, trim the old ones
  • Old app versions – remove disabled Snap revisions
  • Your cache – browser cache, app temp files, thumbnails
  • Your trash – permanently empties it ⚠️
  • Developer caches – pip (Python) and npm (Node.js) if installed
  • Docker junk – unused containers, images, volumes, and networks

Questions?

  • See USAGE.md for all the flags and options
  • Check warning.md if you're worried about safety
  • Want to add a new cleanup step? See CONTRIBUTING.md

Licensed under MIT (free to use and modify).

About

Clean up unnecessary files and free up disk space on Linux (Ubuntu/Debian).

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages