Remove unnecessary packages

You can remove unnecessary packages from your system with the following command. It will automatically remove unused packages from your system.

$ sudo apt-get autoremove

Clean up apt-cache in Ubuntu

Run the following command to clear it.

$ sudo du -sh /var/cache/apt 

You may also use any of the following commands to accomplish the same.

$ sudo apt-get autoclean
$ sudo apt-get clean

Clean up System Logs

Every Linux system logs different kinds of information such as system messages, standard output and errors of various services in Ubuntu.

Here is the command to view the size of your system log.

$ sudo journalctl --disk-usage

Here is the command to restrict your system to log only information for up to past 7 days.

$ sudo journalctl --vacuum-time=7d



Content was last modified: 2022-08-11 11:35:26
I like to see who's visiting my website, do you accept?
Do you want to accept tracking cookies?