Clean-My-Linux
Clean-My-Linux copied to clipboard
A script to clean Linux work environment and save you some space!
Clean-My-Linux
A script to clean-up your Linux work enviroment.
- Clone the repo:
git clone https://github.com/Mostafa-wael/Clean-My-Linux.git - Go to the script:
cd Clean-My-Linux/ - Give the script the required permissions:
chmod u+x clean - Add it to your binaries:
sudo cp ./clean /usr/local/bin - To solve some permission issues:
sudo chown -R $(whoami) /usr/local/bin/clean - Finally, run:
sudo clean
Check the storage before and after!
The script does the following:
- Clean all the log files.
- Clean systemd journal logs.
- Clean the thumbnail cache.
- Free up space by cleaning out the cached packages.
- Getting rid of partial packages.
- Getting rid of no longer required packages.
- Remove Any Automatic Dependencies that are No Longer Needed with all of the associated configuration files from the dependencies.
- Getting rid of orphaned packages.
- Remove the Trash.
- Remove Man.
- Delete all .gz and rotated file.
- Cleaning the old kernels.
- Removes old revisions of snaps(leaves only 2 versions).
Enjoy the free space!