Difference between revisions of "Debian Package Management"

From FreekiWiki
Jump to navigation Jump to search
(mention dpkg)
(add more detail about what each of the commands does)
Line 2: Line 2:
  
 
===overview===
 
===overview===
this class should outline the basics of debian package management- searching, installing, updating and removing  
+
 
software.
+
this class should outline the basics of debian package management- searching,
 +
installing, updating and removing software.
  
 
===background===
 
===background===
Line 31: Line 32:
 
where to get software from: /etc/apt/sources.list
 
where to get software from: /etc/apt/sources.list
  
apt-get update
+
update the list of available packages(do this after changing sources.list):
 +
 
 +
apt-get update
 +
 
 +
upgrade packages:
 +
 
 +
apt-get upgrade
 +
 
 +
do a more thorough upgrade:
 +
 
 +
apt-get dist-upgrade
 +
 
 +
install a package:
 +
 
 +
apt-get install firefox
 +
 
 +
remove a package:
 +
 
 +
apt-get remove firefox
 +
 
 +
clear out downloaded package files:
  
apt-get upgrade
+
apt-get clean
  
apt-get dist-upgrade
+
only clear out package files no longer available:
  
apt-get remove
+
apt-get autoclean
  
apt-get clean
+
search for software:
  
apt-get autoclean
+
apt-cache search firefox
  
apt-cache search
+
show available versions of a package:
  
apt-cache policy
+
apt-cache policy firefox
  
 
pinning: /etc/apt/preferences
 
pinning: /etc/apt/preferences
Line 57: Line 78:
 
underneath it all, lies [http://packages.debian.org/dpkg dpkg]
 
underneath it all, lies [http://packages.debian.org/dpkg dpkg]
  
dpkg -l
+
list status of installed packages:
 +
 
 +
dpkg -l
 +
 
 +
another way to list the status of packages:
 +
 
 +
dpkg --get-selections
 +
 
 +
list the files in a package:
 +
 
 +
dpkg -L firefox
  
dpkg --get-selections
+
find out which package owns a certain file:
  
dpkg -L
+
dpkg -S /bin/bash
  
dpkg -S
+
install a package without using apt or aptitude(this does no dependency
 +
resolution- so avoid if at all possible):
  
dpkg -i
+
dpkg -i hackme-script-foo_0.0.1_i386.deb
  
 
====synaptic====
 
====synaptic====

Revision as of 11:15, 2 April 2006

This is a stub. Please feel free to give this article love and attention if you know more about this topic than we have here.


overview

this class should outline the basics of debian package management- searching, installing, updating and removing software.

background

prerequisites

suggested background

terms

tips for working environment

  • keep a web browser pointed to this page
  • open several terminal windows
  • don't forget to use the "man" command, or -h and --help
  • commandline reminders
    • remember to use tab completion.
    • hit tab twice, fast.
    • hit tab again!
    • remember to use the up arrow to re-do a previous command
    • keep hitting tab!

topics covered

apt

apt

where to get software from: /etc/apt/sources.list

update the list of available packages(do this after changing sources.list):

apt-get update

upgrade packages:

apt-get upgrade

do a more thorough upgrade:

apt-get dist-upgrade

install a package:

apt-get install firefox

remove a package:

apt-get remove firefox

clear out downloaded package files:

apt-get clean

only clear out package files no longer available:

apt-get autoclean

search for software:

apt-cache search firefox

show available versions of a package:

apt-cache policy firefox

pinning: /etc/apt/preferences

aptitude

aptitude

similar to apt, but more sophisticated. has a text-only menu system.

dpkg

underneath it all, lies dpkg

list status of installed packages:

dpkg -l

another way to list the status of packages:

dpkg --get-selections

list the files in a package:

dpkg -L firefox

find out which package owns a certain file:

dpkg -S /bin/bash

install a package without using apt or aptitude(this does no dependency resolution- so avoid if at all possible):

dpkg -i hackme-script-foo_0.0.1_i386.deb

synaptic

synaptic

it's graphical. point and click your way to carpal tunnel.