Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Managing Debian Software with APT (apt-get etc)
Prev Home Next

APT HOWTO
Chapter 5 - Getting information about packages.


There are some front-end programs for the APT system that make it significantly easier to get listings of packages that are available for installation or are already installed, as well as to find out what section a package is in, what its priority is, what its description is, etc.

But... our goal here is to learn how to use pure APT. So how can you find out the name of a package that you want to install?

We have a number of resources for such a task. We'll begin with apt-cache. This program is used by the APT system for maintaining its database. We'll take just a brief look at some of its more practical applications.


5.1 Discovering package names

For example, suppose that you want to reminisce about the good old days of the Atari 2600. You want to use APT to install an Atari emulator, and then download some games. You can do:

     # apt-cache search atari
     atari-fdisk-cross - Partition editor for Atari (running on non-Atari)
     circuslinux - The clowns are trying to pop balloons to score points!
     madbomber - A Kaboom! clone
     tcs - Character set translator.
     atari800 - Atari emulator for svgalib/X/curses
     stella - Atari 2600 Emulator for X windows
     xmess-x - X binaries for Multi-Emulator Super System

We find several packages related to what we're looking for, together with brief descriptions. To get more information about a specific package, I can then use:

     # apt-cache show stella  
     Package: stella
     Priority: extra
     Section: non-free/otherosfs
     Installed-Size: 830
     Maintainer: Tom Lear <[email protected]>
     Architecture: i386
     Version: 1.1-2
     Depends: libc6 (>= 2.1), libstdc++2.10, xlib6g (>= 3.3.5-1)
     Filename: dists/potato/non-free/binary-i386/otherosfs/stella_1.1-2.deb
     Size: 483430
     MD5sum: 11b3e86a41a60fa1c4b334dd96c1d4b5
     Description: Atari 2600 Emulator for X windows
      Stella is a portable emulator of the old Atari 2600 video-game console
      written in C++.  You can play most Atari 2600 games with it.  The latest
      news, code and binaries for Stella can be found at:
      https://www4.ncsu.edu/~bwmott/2600

In this output you have many details about the package that you want (or don't want) to install, together with the full description of the package. If the package is already installed on your system and there is a newer version, you'll see information about both versions. For example:

     # apt-cache show lilo
     Package: lilo
     Priority: important
     Section: base
     Installed-Size: 271
     Maintainer: Russell Coker <[email protected]>
     Architecture: i386
     Version: 1:21.7-3
     Depends: libc6 (>= 2.2.1-2), debconf (>=0.2.26), logrotate
     Suggests: lilo-doc
     Conflicts: manpages (<<1.29-3)
     Filename: pool/main/l/lilo/lilo_21.7-3_i386.deb
     Size: 143052
     MD5sum: 63fe29b5317fe34ed8ec3ae955f8270e
     Description: LInux LOader - The Classic OS loader can load Linux and others
      This Package contains lilo (the installer) and boot-record-images to
      install Linux, OS/2, DOS and generic Boot Sectors of other OSes.
      .
      You can use Lilo to manage your Master Boot Record (with a simple text screen)
      or call Lilo from other Boot-Loaders to jump-start the Linux kernel.
     
     Package: lilo
     Status: install ok installed
     Priority: important
     Section: base
     Installed-Size: 190
     Maintainer: Vincent Renardias <[email protected]>
     Version: 1:21.4.3-2
     Depends: libc6 (>= 2.1.2)
     Recommends: mbr
     Suggests: lilo-doc
     Description: LInux LOader - The Classic OS loader can load Linux and others
      This Package contains lilo (the installer) and boot-record-images to
      install Linux, OS/2, DOS and generic Boot Sectors of other OSes.
      .
      You can use Lilo to manage your Master Boot Record (with a simple text screen)
      or call Lilo from other Boot-Loaders to jump-start the Linux kernel.

Note that the first in the list is the available package and the second is the one already installed. For more general information about a package, you can use:

     # apt-cache showpkg penguin-command
     Package: penguin-command
     Versions: 
     1.4.5-1(/var/lib/apt/lists/download.sourceforge.net_debian_dists_unstable_main_binary-i386_Packages)(/var/lib/dpkg/status)
     
     Reverse Depends: 
     Dependencies: 
     1.4.5-1 - libc6 (2 2.2.1-2) libpng2 (0 (null)) libsdl-mixer1.1 (2 1.1.0) libsdl1.1 (0 (null)) zlib1g (2 1:1.1.3) 
     Provides: 
     1.4.5-1 - 
     Reverse Provides:

And to just find out what packages it depends on:

     # apt-cache depends penguin-command
     penguin-command
       Depends: libc6
       Depends: libpng2
       Depends: libsdl-mixer1.1
       Depends: libsdl1.1
       Depends: zlib1g

In summary, we have a range of weapons we can use to find out the name of a package we want.


Managing Debian Software with APT (apt-get etc)
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire