Linux apt-get

With Debian-based of the Linux system, you will need to use apt-get as the package handle utility to handle your Linux Distro packages.

The Basic of apt-get,
apt-get update
– Resynchronise installed packages with their sources. (Always do this before an upgrade.)

apt-get upgrade
– Install the newest version of all packages installed on the system.

apt-get dist-upgrade
– Upgrade to the latest version of your distribution.

apt-get install package1 package2 package3
– Install programs package1, package2 and package3 along with all their dependencies.

apt-get remove package1 package2 package3
– Remove programs package1, package2 and package3.

apt-get purge package1 package2 package3
– Remove programs package1, package2 and package3 and delete any configuration files that they used.

apt-get check
– Update the package cache and check for any broken dependencies.

apt-get clean
– Clean out retrieved package files.

apt-get autoclean
– Clean out retrieved package files, but only those that are no longer needed.

apt-get autoremove
– Remove any packages that were installed to satisfy dependencies but are no longer required.

For advance usage,

apt-get source package1
– Retrieve source files for package package1.

apt-get build-dep package1
– Get all the dependencies needed to build package package1.

apt-get source package1 -b
– Fetch the source code then compile it.

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.