Home > English, OSS Solutions, Tech Crunch > Using Debian’s superior package management system (APT)

Using Debian’s superior package management system (APT)

This article was first written in January 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/197).

The Debian GNU/Linux FAQ – Chapter 6 – Basics of the Debian package management system

Tips on working with Packaging Commands on Debian Linux

Debian package management, distributions and the /etc/apt/sources.list file

Creating custom kernels with Debian’s kernel-package system

Debian’s APT is probably the best packaging system available today. The last relevant drawback, packages signing, has been fixed recently, and will be part of Etch and following.

In the meanwhile, let’s try to approach the «Beast».

APT is «just» a set of frontends to the underlying dpkg

So, some of the manipulations done using APT may benefit of using dpkg directly instead. For example, manipulating an already installed package or a package which is already available on the local filesystem.

APT is a set of tools including, but not limited to: apt-get, apt-cache and aptitude. Their main role is to search and retrieve packages and their dependencies and pass them to dpkg. Their configuration files are stored in /etc/apt/ on your favorite OS.

The sources of the packages are listed in /etc/apt/sources.list, which is therefore mandatory.

Using apt is pretty simple, once you get some basic rules: Use apt-get for retrieving (downloading or copying from a CD or other supported media), installing and removing packages. Use apt-cache for information about packages, like their existence or not in Debian, their names, descriptions, version numbers available, … Use aptitude for enhanced features over apt-get, which it basically builds upon.

But let’s see in practise

Searching a package based on keywords in the name or description of the package:

$ apt-cache search keyword1 keyword2

Check the package version available (from sources in sources.list)

$ apt-cache policy package_name

Show more information about the same package [1


$ apt-cache show package_name

Install it and all of its dependencies

$ sudo apt-get install package_name

[1] the same for a package already installed would be dpkg -l package_name

Categories: English, OSS Solutions, Tech Crunch Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: