Skip to content

"The Linux system cleaner that actually frees up space. Nukes node_modules, Docker volumes, old kernels, and other dev junk. ๐Ÿงน๐Ÿ”ฅ

Notifications You must be signed in to change notification settings

ind4skylivey/LinuxJanitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LinuxJanitor Banner

๐Ÿงน LinuxJanitor

Because your disk space is precious (and node_modules is a black hole).

LinuxJanitor is the Bash script your grandmother warned you about. It's an automated, multi-distro cleaning utility that goes into the dark corners of your filesystem and kicks out the dust bunnies (and the 40GB of Docker images you haven't used since 2021).

Current Version: 2.5 "Power User Edition" โšก


๐Ÿง Why?

Because manual cleanup is for people with too much free time. I got tired of running pacman -Sc, docker system prune, and deleting ~/.cache manually every week. So I wrote a script that does it all, looks cool while doing it (spinners! progress bars!), and supports pretty much every major distro.

Supported Distros:

  • ๐Ÿน Arch Linux (Manjaro, Endeavour, etc.) - I use Arch btw.
  • ๐ŸŒ€ Debian / Ubuntu / Mint / Pop!_OS
  • ๐ŸŽฉ Fedora / RHEL / CentOS
  • ๐ŸฆŽ openSUSE
  • Gentoo (if you are compiling this README, hi).

๐Ÿ”ฅ The "Choose Your Violence" Modes

We have 3 levels of aggressiveness, because sometimes you just want to tidy up, and sometimes you want to nuke everything from orbit.

1. ๐Ÿ›ก๏ธ --safe (The "I have trust issues" mode)

Runs with safety scissors. Only touches temporary caches that are guaranteed to regenerate.

  • Cleans: Browser caches, Thumbnails, Temp files.
  • Risk Level: 0/10. Safe for your grandma's laptop.

2. ๐Ÿงน --standard (The "Regular human" mode)

Default. The sweet spot. Cleans what needs to be cleaned without breaking your dev environment.

  • Cleans: Everything in Safe + Package Manager Cache (apt/pacman/dnf), Trash, Journal logs (keeps last 2 weeks).
  • Risk Level: 2/10. Standard maintenance.

3. ๐Ÿ’€ --aggressive (The "I choose violence" mode)

WARNING: This mode wakes up and chooses chaos. Ideally for Power Users who know what git clone means.

  • Dev Junk: Nukes node_modules caches, Cargo registry (Rust), Go mod cache, Gradle/Maven. (You will have to re-download deps!)
  • Docker: Prunes images AND Volumes (optional confirmation).
  • Kernel Assassin: Hunts down old kernels and removes them (Debian/Fedora).
  • Electron Bloat: Cleans heavy caches from Discord, Slack, Spotify, VS Code workspace history.
  • Risk Level: 8/10. Don't come crying if you have to re-download the internet.

๐Ÿš€ Usage

โšก One-Command Install (The "I'm lazy" method)

Download, install to ~/.local/bin, and make it executable automatically:

curl -fsSL https://raw.githubusercontent.com/ind4skylivey/LinuxJanitor/main/install.sh | bash

Then you can just run it from anywhere:

system-cleanup-enhanced.sh

(Running it without arguments opens the Interactive Menu)

๐Ÿข Manual Install

Old school? I respect that.

# 1. Download the script (or clone this repo)
git clone https://github.com/ind4skylivey/LinuxJanitor.git
cd LinuxJanitor

# 2. Give it power
chmod +x system-cleanup-enhanced.sh

# 3. RUN IT (Opens Menu)
./system-cleanup-enhanced.sh

๐Ÿค– CLI Arguments (For Automation & Speed)

Skip the menu and just get things done:

Flag What it does
--safe The boring mode. See above.
--standard The default. Standard cleanup.
--aggressive The fun mode. See above.
-i Interactive Steps. Asks for permission before every single step.
-y Yes Mode. Automatic mode. Great for cron jobs.
-d Dry Run. Pretend to clean. See how much space you would save.

๐Ÿ› ๏ธ Configuration

The script creates a config file at ~/.config/system-cleanup/config.conf. You can edit it manually if you want to permanently enable the "Kernel Assassin" or disable "Browser Cleanup" because you like keeping 4GB of cookies.


โš ๏ธ Disclaimer

I am not responsible if this script deletes your homework, your Bitcoin wallet, or your cat. I have tested this on my machines, but rm -rf is a powerful spell. Use --dry-run first if you are nervous.


Made with ๐Ÿ’ป and โ˜• by iL1v3y

About

"The Linux system cleaner that actually frees up space. Nukes node_modules, Docker volumes, old kernels, and other dev junk. ๐Ÿงน๐Ÿ”ฅ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages