From Knoppix Documentation Wiki
Revision as of 07:39, 18 September 2005 by Dr Kludge (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


  • To list all the files in a package
dpkg -L packagename
  • To install a package of a particular release ( assuming it's in your sources.list ).
apt-get install -t unstable packagename
  • Tells the status (hold, purge etc..) of the package.
dpkg --get-selections <package name>
  • To show anything in database with the package name.
dpkg -l ¦ grep <package name>
  • To deinstall the package with all configuration files.
dpkg --purge <package name>
  • To save or edit your packages status use
dpkg --get-selections > currentselections.txt 

re-directs your packages to the file, to restore list

dpkg --set-selections < currentselections.txt 


apt-get update 

to refresh then

apt-get upgrade 

to make the changes , also can be used to keep your current settings on any install just restore the list to the new install and

apt-get update 

and upgrade or dist-upgrade and you will have the same software packages on the new install.

  • To put a package on hold
echo packagename hold | dpkg --set-selections
  • To take a package off hold
echo packagename install | dpkg --set-selections
  • To list the version of an installed package
apt-cache policy packagename | grep Installed
  • To list packages containing a certain string in its package name, version or description
COLUMNS=120 dpkg -l | grep string