[TriLUG] debian (actually ubuntu) and apt-get

Alan Porter porter at trilug.org
Wed Apr 18 16:07:41 EDT 2007


> is there something other than sources.list that determines where
> apt-get/aptitude goes to get/search for packages? a friend of mine is
> running the same release that i am (6.06 LTS). his sources.list is 
> identical
> to mine but when i do an 'aptitude search dump' (looking for the bsd
> dump/restore utilities) i get very different results (his has the 
> package in
> there and mine does not).

His cache might be newer/older than yours.

I'm not sure when aptitude gets an updated list of packages.  But I do 
know how apt does it.  Aptitude sits on top of apt.  Here's what you 
need to run apt.

*apt-get update* - fetches a list of all available packages
*apt-get upgrade* - upgrades packages, but does not add new dependencies 
or delete old dependencies
*apt-get dist-upgrade* - upgrades packages, adding and deleting 
dependencies as needed
*apt-cache search keyword* - looks for a package
*apt-get install package* - installs a package and dependencies
*apt-get remove package* - removes a package (but leaves old dependencies)

There's a nice utility called "deborphan" that shows old dependencies 
that are no longer needed.  I sometimes do a "apt-get remove --purge 
`deborphan`" to clean up old libraries.

If you want to dive a little deeper, apt sits on top of dpkg.  About the 
only time I use dpkg is to clean things up or reconfigure a package.

*dpkg --remove --purge package*
*dpkg-reconfigure package*


Alan





.






More information about the TriLUG mailing list