Debian Package Managing Survival Guide

I've heard that Debian is superior to some other distributions thanks to its package managing tools APT. I cannot understand why! The only explanation - for me - is that other distro are painfully worst. I've used a little rpm tools and was quite comparable to apt, except that mostly you need to know a single command, so you've not to guess what command to execute to do what you need.

Search and querying
apt-cache pkgnames Print all available packages. Useful combined with grep, if you know what you want install
apt-cache search package-name Search packages that can be installed
apt-cache show package-name Query informations about a package
apt-show-versions -u Shows what packages may be upgraded
apt-file search filename search the package name for a file you know
apt-file list package-name list files of a package
Installing, upgrading and removing
apt-get install package-name install/upgrade one package and its dependencies
apt-get install package-name=version install/upgrade to a specific package version
apt-get remove package-name remove one package and its dependencies
dpkg -P package-name purge packages (remove 'zombie' files)
apt-get -u upgrade upgrades all installed packages and dependencies. -u means verbose, without it, you upgrade blindly!
apt-get -u dist-upgrade upgrades the entire distro. -u means verbose as for the previous. Don't ask me what's difference between this and previous: only apt-developers know this secret... documentation is confusing. Really a bad interface design: these are the things that I hate of Linux.
Info about installed packages
dpkg -l list installed packages
dpkg -L package-name list files in package. useful if you want to know where configuration files and other stuff are located
dpkg -S file-name list package owning a certain file
Maintenance
dpkg-reconfigure package-name reconfigures the package
apt-get update resynchronize index files from their sources (sources are specified in file /etc/apt/sources.list)
apt-get clean Remove downloaded .deb files
apt-get autoclean Remove downloaded .deb files that are nomore available for download (older?)

Well, to manage packages you only need to remember syntax of 5 different commands... Fantastic!

Other utility that can be used:

  • apt-howto: you can type this command, to browse an help file (keys chosen to browse are ridiculous! you'll need an help for using the help!)
  • aptitude: not really user-friendly but functional. Almost usable.
  • dselect: I tried it: I was just able to find the quit option before making damages... few!
  • synaptic: Graphical package manager. I've not installed it, because on my server there's no X. People say that it's easy. I can imagine that hopefully it's like a Windows installer.
I think that also text-mode apps can be usable and easy. I've used XTree Gold, Norton Commander and PC Tools for decades, decades ago, and they were light years ahead those crappy tools.

If you find any error here, please report it to me. I believe that -as for many things under Linux - it is impossible to understand if you didn't programmed it yourself. Maybe this is why with Linux anyone reinvents the same stuff - in a different fashion - over and over again...

Knok knok... Linux developers!


No Responses to “Debian Package Managing Survival Guide”  

  1. No Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Calendar

August 2005
M T W T F S S
« Jul   Sep »
1234567
891011121314
15161718192021
22232425262728
293031  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening