AboutWelcome to Free Software Daily (FSD). FSD is a hub for news and articles by and for the free and open source community. FSD is a community driven site where members of the community submit and vote for the stories that they think are important and interesting to them. Click the "About" link to read more...
The dpkg utility works at a layer lower than the APT utilities do. APT uses dpkg behind the scenes to manage software on your Ubuntu system. APT and dpkg work similar to the way yum and rpm do on Red Hat–based Linux distributions.
Dpkg is the Ubuntu package manager dpkg is a medium-level tool to install, build, remove and manage Ubuntu packages. The primary and more user-friendly front-end for dpkg is dselect.dpkg itself is controlled entirely via command line parameters,which consist of exactly one action and zero or more options.
dpkg is pretty slow in Debian-based systems, usually because of the many files which are stored in the /var/lib/dpkg/info folder. To speed up things, Luca Bruno created a project called tdpkg which uses an sqlite3 or tokyocabinet database for loading the dpkg .list files in the /var/lib/dpkg/info folder which makes dpkg a lot faster.
In the last years, I have seen many people try to use dpkg –build to create Debian packages. Indeed, if you look up dpkg’s and dpkg-deb‘s manual pages, this option seems to be what you have to use:
n Debian GNU/Linux and its derivatives such as Ubuntu the software packages are bundled in a special format. We generally call them deb packages. A .deb package is basically an archive of files that you want to install to your computer, plus some header and control information that identifies the software. The deb files can be manipulated with dpkg command.
There is always a time when your GNU/Linux machine's screen output stops working. Maybe it's displaying garbage to your monitor instead of Gnome or KDE. Or maybe it's displaying 640x480 resolution with 8 colors instead of 1280x1024 with 24 colors. Actually, this will happen with Windows as well. But unlike Windows, GNU/Linux provides a handy tool to fix it.
The source package format 3.0 (quilt) has a neat feature for this. Instead of unconditionally using debian/patches/series to look up patches, dpkg-source first tries to use debian/patches/vendor.series (where vendor is ubuntu, debian, etc.). Note that dpkg-source does not stack patches from multiple series file, it uses a single series file, the first that exists.
This is a guide containing the most popular and useful ways of using the APT and DPKG commands, and it applies to both Ubuntu and Debian (and their derivatives). I mentioned where super user privileges are required, the ones without a mention can be executed as normal user.