Home » Linux Host, Ubuntu, SysAdmin » System Administration, Security » How to keep Ubuntu always updated and clean ?

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.

Free Up Space On Your C Drive and C...
Free Up Space On Your C Drive and Clean Up Your Windows System

Leave a Comment