Tuesday, February 5, 2013

apt-get

Ubuntu uses apt (Advanced Packaging Tool) for package management.

The apt-get command is used to work with apt. It is a simple command line interface for downloading and installing packages.

Install a Package    sudo apt-get install softwarePackage
Remove a Package    sudo apt-get remove softwarePackage
Remove a Package + configuration files sudo apt-get --purge remove softwarePackage
Update the Package Index sudo apt-get update
Upgrade Packages    sudo apt-get upgrade

When we try to install a package and it fails giving missing dependencies as reason, it asks to run the following.
sudo apt-get -f install
Here -f, --fix-broken means,
Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system.

Apt stores a list of repositories or software channels in the file
/etc/apt/sources.list

APT package index is essentially a database of available packages from the repositories defined in the above file.

Actions of the apt-get command are logged in the /var/log/dpkg.log log file.

No comments:

Post a Comment