How to keep Ubuntu always updated and clean ?

You can update Ubuntu as mentioned in our another post “How to update Ubuntu Linux using command line ?” once you updated Ubuntu, its good to remove all the old packages or some packages which are not at all used but consumes the disk space.

Remove individual package

 $ sudo apt-get remove package_name

remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system.

 $ sudo apt-get autoremove

autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.

Remove package and its all configuration files

 $ sudo apt-get purge package_name/string

purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).

Remove all downloaded but not installed packages

 $ sudo apt-get clean

clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.

 $ sudo apt-get autoclean

Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control.

How to install docker on ubuntu AWS... x
How to install docker on ubuntu AWS Server

Leave a Comment

Sign up to our newsletter!

ADB Commands Android Android Applications Android Build system Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia NDK / Middleware / HAL Operating System Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto Embedded Linux