Saturday, 9 August 2008

apt-get command

Most Debian Linux are already familiar with the apt-get command. For those unfamiliar with it here's a short description.

apt-get is a command-line tool for handling Debian Linux packages and it is used to install/remove individual packages, upgrade packages, apply patches, upgrade debian distribution, download .deb files etc. This command is a frontend to manyy GUI applications such as "Synaptic Package Manager"

Install or upgrade package

$ apt-get install [package name]


Remove a package

$ apt-get remove [package name]


Remove a package and its configuration files

Use this if 100% sure that the package will not be used never again :)

$ apt-get --purge remove [package name]


Upgrade a package

This will list all possible software upgrades. If you wish to upgrade them all hit the 'y' key:

$ apt-get upgrade


To upgrade single package use the 'install' argument option.

Distribution upgrade

Intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.

$ apt-get dist-upgrade


note: use auto-complete command line feature if you don't know full package name. It is done using the <TAB> key.

No comments: