Compdigitec Labs

« | Home | »

Using dpkg in Ubuntu and Debian

By admin | July 29, 2008

For those of you who are stuck in an command line (bash) environment with no access to Synaptic, here are 9 useful and clear tips to help you to get the hang of package management with dpkg in the Ubuntu Linux and Debian Linux distributions.

  1. dpkg –install (or dpkg -i) – Installs the specified package. Example:
    sudo dpkg --install package.deb
  2. dpkg –remove (or dpkg -r) – Removes the specified package. Example:
    sudo dpkg --remove package
  3. dpkg –remove –purge (or dpkg -r -P) – Removes the specified package and purges all configuration data. Example:
    sudo dpkg --remove --purge package
  4. dpkg –unpack directory/ – Unpacks the package’s contents into directory/. Example:
    dpkg --unpack package.deb directory/
  5. dpkg –listfiles (or dpkg -L) – Lists the files that the specified package contains. Example:
    dpkg --listfiles package
  6. dpkg –list (or dpkg -l) – List the package details in great detail. Example:
    dpkg --list package
  7. dpkg –status (or dpkg -s) – Lists the package status in detail, along with version, description and architecture information. Example:
    dpkg --status package
  8. dpkg –root=/directory –install (or dpkg –root=/directory -i) – Install the package into /directory other than root. Example:
    sudo dpkg --root=/directory --install package
  9. dpkg –simulate command (or dpkg –dry-run) – Simulates what would happen if you did run the command command for real. Example:
    sudo dpkg --simulate command

So there you have it, 9 simple yet very effective tips to package management with dpkg on Ubuntu and Debian. If this article helped you, please help us spread the word!

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 1 Comment »

One Response to “Using dpkg in Ubuntu and Debian”

  1. User links about "dpkg" on iLinkShare Says:
    March 7th, 2009 at 18:24

    […] saved by marythor 29 days ago6 votesHacking LiveCD Ubuntu>> saved by MuggleSam 33 days ago2 votesUsing dpkg in Ubuntu and Debian>> saved by Sonicsiem 36 days ago3 votesdpkg: subprocess post-removal script returned error exit […]

Comments