Linux has it’s own data management system that cleans your computer under the belt but still, sometimes we need to know how to manually initiate disk cleaning and control processes to enhance your computer’s performance. Below are 5 ways to keep the ubuntu system clean.
1. Uninstalling and Removing Unnecessary Applications: To uninstall the application you can you simple command.
$ sudo apt remove [application name..]..
Press “Y” and Enter. If you don’t want to use the command line, you can use the Ubuntu Software manager. Just click on the remove button and the application will be removed.
2. Removing Unnecessary Packages and Dependencies: After removing certain apps and packages some data is left which needs to be clean for that just use command.
$ sudo apt autoremove
3. Removing Old Kernels From System: To list all kernels you can use the command
$ sudo dpkg --list 'linux-image*'
And you can remove any of this kernel by command
$ sudo apt-get remove linux-image-VERSION
Choose any version you want to remove and press Enter.
4. Cleaning Apt Cache: APT generates a cache of install apps and keeps them in your
/var/cache/apt/archives directory even after those apps have been uninstalled. To check the amount of apt-cache on your system with the command.
$ sudo du -sh /var/cache/apt
To remove this cache use
$ sudo apt-get clean
and this will clean the APT cache.
5. Cleaning Thumbnail Cache from System: To check the size of Cache in the system you can use command.
$ du -sh ~/.cache/thumbnails
To clean this cache you can use the command
$ sudo rm -rf ~/.cache/thumbnails/*
- Interesting Facts about Ubuntu
- Get to know Ubuntu 18.04 LTS | Welcome Bionic Beaver!!
- How to Install Ulauncher in Ubuntu?
- Keyboard Shortcuts for Ubuntu | Set - 1
- How to Install Chrome in Ubuntu?
- How to install Ubuntu on VirtualBox?
- Making an Alias to Shutdown Ubuntu
- Creating and Configuring Wi-Fi Hotspot in Ubuntu
- How to Install and Configure Docker in Ubuntu?
- Snap Package Manager on Ubuntu
- How to setup cron jobs in Ubuntu
- How to Install and Configure Elasticsearch on Ubuntu ?
- How to Install and Configure MongoDB in Ubuntu?
- Installing and Configure vim Plugin in Ubuntu
- How to make sure that Apache service keeps running in Ubuntu
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.