Searching for packages...

Yannick Le Saint (kyncani) y.lesaint at gmail.com
Thu May 12 20:57:14 UTC 2005


On Thu, 2005-05-12 at 11:43 -0700, Justin Mason wrote:
> Yannick Le Saint (kyncani) writes:
> > On Thu, 2005-05-12 at 13:12 +1200, Christoph Georgi wrote:
> > > Yannick Le Saint (kyncani) wrote:
> > > |   Might be complete enough. Am i missing something, anyone ?
> > > 
> > > dselect and aptitude for command line package management ?!
> > 
> > Yeah, never liked those, really fond of apt-get + debfoster :)
> > 
> > This is it then :
> > 
> > ****************************************
> > ***  Debian package management guide ***
> > [...]
> 
> Yannick -- is this on the web anywhere?  It's an excellent guide -- I've
> been using debian for a few years, and other linux distros for ages before
> that, and quite a bit of this was new to me.  Thanks!
> 
> in my opinion, it'd be a great candidate for a page on the wiki...

  I am trying to make a wiki out of it :)

  This is my current version, using MoinMoin format (ubuntu wiki
format), it might be kind of lengthy for a mailing list, but given the
number of messages per day, i think subscribers can handle the extra
load.


{{{
PackageManagementHowto
}}}

= PackageManagementHowto =

== 1- Introduction ==

  * Many different tools/files are used in Ubuntu for package
management, each one having a different purpose. This howto will help
you putting it all together.

  * The tools will be listed in order of importance, with each one of
them :

    * A small description.
    * Examples of common use.
    * Related tools, when applicable.
    * Some links.

  * Keep in mind that there are a lot of tools __because__ there is a
lot of different needs.

== 2- Contents ==

  * 1- Introduction
  
  * 2- Contents

  * The tools and files presented in this howto :
  
    * 3- /etc/apt/sources.list
    
    * 4- apt-get
    
    * 5- dpkg
    
    * 6- synaptic, kynaptic
    
    * 7- apt-cache
    
    * 8- debfoster
    
    * 9- dpkg-reconfigure
    
    * 10- apt-file
    
    * 11- dlocate
    
    * 12- dpkg-divert
    
    * 13- /etc/apt/preferences
    
    * 14- gkdebconf
    
    * 15- debmirror
    
    * 16- apt-build
    
    * 17- equivs
    
    * 18- vrms
    
    * 19- auto-apt
    
    * 20- aptitude
    
    * 21- dselect
    
    * 22- deborphan

== 3- /etc/apt/sources.list ==

  * Package repositories are defined here.
  
  * Packages will be automagically pulled from them on install/upgrade.

  * __Example__, enabling almost everything available for hoary :

--------
{{{
## Hoary
## Security
deb http://security.ubuntu.com/ubuntu hoary-security main restricted
universe multiverse
deb-src http://security.ubuntu.com/ubuntu hoary-security main restricted
universe multiverse
## Major bug fixes
deb http://archive.ubuntu.com/ubuntu hoary-updates main restricted
universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hoary-updates main restricted
universe multiverse
##Main archive
deb http://archive.ubuntu.com/ubuntu hoary main restricted universe
multiverse
deb-src http://archive.ubuntu.com/ubuntu hoary main restricted universe
multiverse
}}}
--------

  * __Related items :__
  
    * apt-get

    * synaptic, kynaptic

    * /etc/apt/preferences

== 4- apt-get ==

  * High-level package management.

  * Apt-get can install/upgrade/remove packages. It can also upgrade the
entire system.
  
  * Apt-get will use /etc/apt/sources.list to get new packages/updates
automagically.

  * __Examples :__

    * apt-get update

      Update package informations using online repositories.
      This will make apt know about updates that have happened since
last time
      you have "apt-get update".
      
    * apt-get install ssh

      Install the ssh package, automagically handling ssh dependencies.

    * apt-get dist-upgrade

      Upgrade the entire system.

  * __Related tools :__
  
    * synaptic, kynaptic

  * __Links :__
  
    * http://www.ubuntulinux.org/wiki/AptGetHowTo
  
== 5- dpkg ==

  * Low-level package management.

  * Dpkg will __not__ use /etc/apt/sources to retrieve packages, this is
the job of apt.

  * __Examples :__

    * dpkg -l ssh

      * Show the state of package ssh (installed or not, ...)

    * dpkg -L ssh

      * List files provided by package ssh, which must be installed.

    * dpkg -i ./openssh-server_1%3a3.9p1-1ubuntu2_i386.deb
    
      * Install a .deb package file.
  
== 6- synaptic, kynaptic ==

  * Graphical package managers.
  
  * These will provide the same funcionnalities than apt-get with a
user-friendly graphical interface.
  
  * Synaptic is gnome-centric, kynaptic is kde-centric.
  
  * __Related tools :__
  
    * apt-get
    * apt-cache

  * __Links :__
  
    * http://www.ubuntulinux.org/wiki/SynapticHowto
  
== 7- apt-cache ==

  * Search/show various informations about packages, like :
  
    * Description of the package.
    * Version available.
    
  * The packages do '''not''' have to be already installed for apt-cache
to work.
    
  * __Examples :__
  
    * apt-cache search -i http proxy
    
      * Look for a http proxy.

    * apt-cache search -i webmin
    
      * Look for webmin-related packages
        
    * apt-cache show ssh
    
      * Show many informations about ssh (description, version, ...)

  * __Related tools :__
  
    * synaptic, kynaptic
    
== 8- debfoster ==

  * Handle orphaned packages
  
  * Keep a system clean of old libraries
  
  * Remove a package along with all the dependencies it pulled in.
    
  * __Examples :__
  
    * debfoster
    
      * Remove existing orphaned packages, usually old libraries.

    * debfoster gnome-
    
      * Remove gnome, along with all its dependencies.

  * __Related tools :__
  
    * deborphan

  * __Links :__
  
    * http://www.fruit.eu.org/debfoster/
    
== 9- dpkg-reconfigure ==

  * Reconfigure a package.

  * __Example :__
  
    * dpkg-reconfigure xserver-xorg

        * Reconfigure xorg.
        
  * __Related tools :__
  
    * gkdebconf

== 10- apt-file ==

  * Find out which package can provide some file.
  
  * The package do '''not''' have to be already installed for apt-file
to work.
  
  * __Examples :__

    * apt-file search -i bin/scp

      * Look for a package that would provide bin/scp on install.

    * apt-file list psh

      * Show what files psh would provide if installed.

  * __Related tools :__
  
    * dlocate

== 11- dlocate ==
  
  * Find out which package is providing some file.

  * Can only handle already installed packages.

  * __Example :__
  
    * dlocate `which scp`
    
      * Find out which package is providing scp.
      
  * __Related tools :__
  
    * apt-file

== 12- dpkg-divert ==
  
  * Move/rename a package provided file.
  
  * __This can be used to :__
  
    * provide a local implementation of a specific file, making sure it
won't be overwritten by Ubuntu package management
    
    * move a file to some place else.
    
  * __Examples :__
  
    * dpkg-divert --add --local
--divert /etc/monit/.monitrc.local-divert --rename /etc/monit/monitrc

      * Renames /etc/monit/monitrc, so that your version won't get
overwritten.
      
    * dpkg-divert --add --local --divert /etc/cron.weekly/vrms
--rename /etc/cron.monthly/vrms
    
      Move /etc/cron.monthly/vrms so that it get executed on a weekly
basis.
      
== 13- /etc/apt/preferences ==

  * Set different priorities/policies to your repositories.
  
  * Also known as apt-pinning
  
  * __Related item :__
  
    * /etc/apt/sources.list
    
  * __Links :__
  
    * http://www.ubuntulinux.org/wiki/PinningHowto
  
== 14- gkdebconf ==

  * Some graphical front-end that will show you which packages can be
reconfigured, and reconfigure them.
  
  * __Related tools :__
  
    * dpkg-reconfigure
    
== 15- debmirror ==

  * Create a local mirror of online repositories.

  * __Links :__
  
    * http://www.interparse.com/debianmirror/

== 16- apt-build ==

  * Download, compile and install a package.

  * __Related tools :__
  
    * apt-get
  
== 17- equivs ==

  * Make ubuntu package management think you already have a package.
  
== 18- vrms ==

  * Check your software licenses.
  
== 19- auto-apt ==

  * Automatically install packages on missing file access.

  * __Related tools :__
  
    * apt-file
  
== 20- aptitude ==

  * Apt frontend.

  * __Related tools :__
  
    * apt-get
    
    * synaptic, kynaptic
  
== 21- dselect ==

  * Dpkg frontend

  * __Related tools :__
  
    * dpkg
  
== 22- deborphan ==

  * Find orphaned packages
  
  * __Related tools :__
  
    * debfoster
 

-- 
Yannick Le Saint (kyncani) <y.lesaint at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050512/58a7f456/attachment.sig>


More information about the ubuntu-users mailing list