DiskCleaner is a Disk Utility Program made for Linux. It uses inbuilt commands like autoclean, autoremove. DiskCleaner allows users to perform cleaning of cache present in their disk, it also cleans partial packages, no longer required packages, orphaned packages, freeing up space by cleaning cached packages, cleaning old kernals, removing trash etc.
DiskCleaner Enables the following Commands & Checks all the Files :
- Checks All The Drive Space Used by Cached Files.
- Cleans all the Log files.
- Get rid of partial packages.
- Removes no longer required packages , orphaned packages.
- Clears the trash , Man & deletes all the .gz and rotated files.
- Clean-up the old kernels.
apt -get clean && apt-get autoclean
apt-get remove --purge -y software-properties-common
apt-get autoremove -y
sudo apt-get -y remove --purge
apt-get clean
To run DiskCleaner, follow these steps:
-
Ensure root privileges: DiskCleaner requires administrative privileges to function correctly. Run the script as root using
sudo
.sudo ./diskclean.sh
-
Directory: The file will download in the Downloads of your OS so to change the directory type the following command
cd ~/Downloads
. Then typechmod +x diskclean.sh
as it provides root privileges to the file to all the user.