Dpkg is package manager for ubuntu/debian. It’s same as “rpm” is for redhat. Dpkg is used to build, install, remove and provide informations about ubuntu packages. dpkg itself is a low level tool which is used only to manage packages, instead of that APT is high level tool which could fetch the packages also from the remote locations and do some complex tasks. Then there comes tools like aptitude and synaptic which are having a more user friendly interface and a lot more complex ways of dealing with package management.

This is how you could use the dpkg:

  1. Install a package
  2. # dpkg -i <package name.deb>

  3. Install all packages recursively from a directory
  4. # dpkg -R <directory name>

  5. Remove a installed package expect configuration files
  6. # dpkg -r <package name-.deb>

  7. Remove a installed package with configuration files
  8. # dpkg -P <package name-.deb>

  9. Unpack the package but don’t configure it
  10. # dpkg –unpack <package_file-.deb>

  11. Reconfigure an unpacked package
  12. # dpkg –configure <package file-.deb>

  13. Forget about uninstalled available packages
  14. # dpkg –forget-old-unavail

  15. Erase the existing information about what packages are available.
  16. # dpkg –clear-avail

  17. Searches for packages that have been installed only partially on your system.
  18. # dpkg -C

  19. Compare Package version numbers
  20. # dpkg –compare-versions <package 2> op <package 1>

  21. Display dpkg version information
  22. # dpkg –version

  23. Display dpkg licence
  24. # dpkg –license

  25. Display a brief help message
  26. # dpkg –help

  27. Build a deb Package
  28. # dpkg -b <directory> <package name>

  29. List contents of the package
  30. # dpkg -c <filename>

  31. Show information about the package
  32. # dpkg -I <filename>

  33. List packages matching given pattern
  34. # dpkg -l pattern

  35. List all installed packages with short description and package version
  36. # dpkg -l

  37. Report status of package
  38. # dpkg -s <package name>

  39. List files installed from the package
  40. # dpkg -L <package name>

  41. List the package name from the installed file
  42. # dpkg -S <filename>

  43. Display details about the package
  44. # dpkg -p <package name>

If you enjoyed this post, make sure you subscribe to my RSS feed!!!!

No related content found.