Ubuntu dpkg Software Uninstall
Uninstalling and purging packages in Debian is a two different concept. The difference is that after the package is removed (unloaded), its configuration files remain in the system and are deleted only when they are purged. By default, Debian will only delete, unless you explicitly indicate that the configuration file will be deleted. If you want to clear the package, the delete operation is implicitly performed before purging. To remove a package, dpkg needs to uninstall the package using the--remove option. Unlike installation, the removal requires only the package name, not the actual Deb file name.
delete
#dpkg-R package_name
Delete all configuration files for the package under the/var/lib/dpkg/info directory, preserving the. postrm and. List files.
Finally, dpkg changes the software state to delete in the database.
Run
$dpkg-L package_name
rc package_name 1.3.10-2 free Pico clone with some new features
Clear
#dpkg-P Package_ Name
Delete all files. All files have been removed (deleted from the system).
Run the Postrm script. If it still exists, run the POSTRM script.
Delete postrm and list files. Keep the two files, remove POSTFIX.POSTRM and postfix.files from the system.
Mark packages as not installed in the DPKG database
$dpkg-L Package_name
PN Package_name <none> (no description available)
Note the status of the output: PN This means that the package is actually cleared, but there is also a record of the package in the database. Therefore, PN explicitly states that the package_name was previously installed, appeared in the package database, and is now completely cleared.
This article is from the "Attitude decides everything" blog, please make sure to keep this source http://sangh.blog.51cto.com/6892345/1629728
Ubuntu dpkg Software Uninstall