Practice Debian/Ubuntu "dpkg" options

LINUXDEBIANUBUNTUDPKGLPIC1-101

2/5/2026

For example, let's use the Gimp package. Download it to try the dpkg commands:

$ sudo apt-get download gimp

$ ls gimp*.deb

gimp_2.8.22-1_amd64.deb (version number, release number, cpu architecture)

$ dpkg -I gimp_2.8.22-1_amd64.deb (Information)

(It shows a lot of information about the package, including dependencies, before installing the package.)

$ dpkg -c gimp_2.8.22-1_amd64.deb (contents)

(All the paths where the files of the program will be)

$ sudo dpkg -i gimp_2.8.22-1_amd64.deb (install & update)

Once the package is installed:

$ dpkg -V gimp (Verify)

$ dpkg -C gimp (Conduct audits)

(If nothing is returned, then everything is fine)

$ dpkg -s gimp (status & dependencies)

(Determine whether a package is installed)

$ dpkg -S gimp (Search)

(It searches in all the system for the paths where "gimp" is)

$ dpkg -l gimp (list matching packages with this name)

$ dpkg -l | less (list all installed packages) (or dpkg --list)

$ dpkg-reconfigure gimp (configure again the package)

$ dpkg -r gimp (remove the package)

(Use dpkg -r if you installed the package manually with dpkg -i, so you didn't use apt-get install. To deal with dependencies, it is better to use apt-get remove / apt-get purge)

Bonus:

$ apt-cache depends gimp (It will only show the dependencies of an installed package)