dpkg basic usage

dpkg basic usage

Posted By: pmietlicki

Published to Linux on Jun 04, 2015

Install a package that you've already downloaded :

dpkg -i package.deb

Unpack it :

dpkg --unpack package.deb

Configuration :

dpkg --configure package.deb

A common error is the files collision. When a package contains an installed file, dpkg will refuse to install it.

In this case, if you think this file does not put your system at risk (which is almost always the case), you can force the installation with --force-overwrite.

Package removal

dpkg -r package.deb

This removal is not complete, every configuration files, scripts, logs and user data will remain. The goal is to keep the possibility of reinstalling it without losing the configuration and all. To completely purge everything use :

dpkg -P package.deb

The equivalent with apt-get :

apt-get remove --purge package.deb

Tags: dpkg

Archive