« Building .deb packages on Ubuntu/Debian | Home | Unofficial Bigloo 3.1a Build for Windows »
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.
- dpkg –install (or dpkg -i) – Installs the specified package. Example:
sudo dpkg --install package.deb
- dpkg –remove (or dpkg -r) – Removes the specified package. Example:
sudo dpkg --remove package - dpkg –remove –purge (or dpkg -r -P) – Removes the specified package and purges all configuration data. Example:
sudo dpkg --remove --purge package
- dpkg –unpack directory/ – Unpacks the package’s contents into directory/. Example:
dpkg --unpack package.deb directory/
- dpkg –listfiles (or dpkg -L) – Lists the files that the specified package contains. Example:
dpkg --listfiles package
- dpkg –list (or dpkg -l) – List the package details in great detail. Example:
dpkg --list package
- dpkg –status (or dpkg -s) – Lists the package status in detail, along with version, description and architecture information. Example:
dpkg --status package
- dpkg –root=/directory –install (or dpkg –root=/directory -i) – Install the package into /directory other than root. Example:
sudo dpkg --root=/directory --install package
- 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 | No Comments »