ubuntu dpkg software uninstall

ubuntu dpkg software uninstallation

Uninstalling and clearing a package in Debian are two different concepts. The difference is that after a package is deleted (uninstalled), its configuration files will still remain in the system, and they will be deleted only when cleared. By default , Debian will only delete the configuration file, unless you explicitly point out, will delete the configuration file. If you want to clear the package, it will be deleted implicitly before the clear. To delete a package, dpkg needs to use - The remove option uninstalls the package. Unlike installation, removal only requires the package name, not the actual deb file name.

delete
    #dpkg -r package_name
Delete all the configuration files of the software package in the /var/lib/dpkg/info directory, and keep the .postrm and .list files.
Finally, dpkg modifies the software status 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 are removed (deleted from the system).
Run the postrm script. If it still exists, run the postrm script.
Delete the postrm and list files. The remaining two files, remove postfix.postrm and postfix.files from the system.
Mark the package as not installed in the dpkg database

$dpkg -l package_name
    pn  package_name                                          (no description available)

Pay attention to the output status: pn This means that the package is actually cleared, but there is still a record of this package in the database. Therefore, pn clearly indicates that package_name has been installed before, appeared in the package database, and now Has been completely cleared.

Recommended Posts

ubuntu dpkg software uninstall
Ubuntu software
How to uninstall software on Ubuntu
Ubuntu update software source
Ubuntu own software record
Ubuntu completely uninstall mysql turn
Install common software on Ubuntu 16.04
Ubuntu16.04 install and uninstall VMware-Workstation 14
Ubuntu18 super detailed common software installation
Ubuntu upgrade software and ubuntu upgrade system commands
Ubuntu configuration source and installation software
Ubuntu18.04 system installation and prerequisite software installation guide
Solution for Postgresql uninstall error under Ubuntu
How to modify software source in Ubuntu 7.10
Install and uninstall CUDA and CUDNN on Ubuntu
Three ways to install software under Ubuntu
Install utility software collection under Ubuntu system