dpkg: purge versus remove

dpkg can be used to install, remove and check the current state of a package. Every package contains the following components

  1. package binaries
  2. configuration files

dpkg has two options –remove and –purge. Both these options are used to remove package contents. But there is a significant difference between the two.’

dpkg –remove is used to remove the package binaries. But if there are configuration files, those will not be removed

$ dpkg --remove package_name

After removing the package, the state of the package becomes un or rc.

dpkg –purge is used to remove the package binaries and the configuration files.

$ dpkg --purge package_name

After removing the package, the state of the package becomes un or pn.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s