dpkg: purge versus remove

Posted by Joys of Programming on in dpkg, Linux, Ubuntu

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.

Tags: , , ,

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.