As described in this article on baeldung.com dpkg provides two primary methods for uninstalling packages that have been installed using the dpkg
tool (rather than apt
or apt-get
):
dpkg -r <package_name>: removes the package and its associated files, but leaves configuration files
dpkg –purge <package_name>: not only removes the package but also purges its configuration files and leftover data
More inormation is available in the dpkg
man page:
man dpkg
...
-r, --remove package...|-a|--pending
Remove an installed package. This removes everything except conffiles
and other data cleaned up by the postrm script, which may avoid having
to reconfigure the package if it is reinstalled later (conffiles are
configuration files that are listed in the DEBIAN/conffiles control
file). If there is no DEBIAN/conffiles control file nor DEBIAN/postrm
script, this command is equivalent to calling --purge. If -a or
--pending is given instead of a package name, then all packages
unpacked, but marked to be removed in file /var/lib/dpkg/status, are
removed.
-P, --purge package...|-a|--pending
Purge an installed or already removed package. This removes everything,
including conffiles, and anything else cleaned up from postrm. If -a
or --pending is given instead of a package name, then all packages
unpacked or removed, but marked to be purged in file
/var/lib/dpkg/status, are purged.
sudo dpkg -r microsoft-edge-stable
? If it doesn't appear indpkg --get-selections
, then you didn't actually install it – Daniel T Feb 02 '24 at 07:13