Debian GNU/Linux : apt

Debian GNU/Linux systems come with a handy tool to manage packages : apt.

These are the commands I use the most.

Searching for a package

% apt-cache search a2ps
a2ps-perl-ja - perl version of Miguel Santana's a2ps (supports KANJI)
a2ps - GNU a2ps - 'Anything to PostScript' converter and pretty-printer

Updating package repository information

This allows you to get the latest information about the available packages (latest versions, archive names, …) :

# apt-get update
Get:1 stable/main Packages [4535kB]
Get:2 stable/main Release [95B]
Get:8 stable/updates/main Release [110B]
Fetched 11.7MB in 1m5s (178kB/s)
Reading Package Lists... Done

Installing a package

# apt-get install a2ps Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
Suggested packages:
The following NEW packages will be installed:
a2ps libpaper1
0 upgraded, 2 newly installed, 0 to remove and 184 not upgraded.
Need to get 20.4kB/745kB of archives.
After unpacking 3240kB of additional disk space will be used.
Do you want to continue? [Y/n]
Creating config file /etc/papersize with new version
Setting up a2ps (4.13b.dfsg.1-1) ...

Upgrading the entire system

# apt-get dist-upgrade

All the packages installed get upgraded to the latest available versions.

Defining sources

All packages sources are defined in /etc/apt/sources.list :
% cat /etc/apt/sources.list
#deb file:///cdrom/ sarge main
deb stable main
deb testing main
deb-src stable main
deb stable/updates main

4 thoughts on “Debian GNU/Linux : apt”

Comments are closed.