====== Ubuntu - Packages - Purge a package ======
Aptitude is preferred, but other approaches can be used if desired.
----
===== Using aptitude =====
Issue the command:
sudo aptitude purge package_name
To purge multiple packages at the same time, separate each package_name with a space.
Use the **remove** option instead to only remove the package but leave the configuration files. This may or may not be the desired effect, so use with caution.
sudo aptitude remove package_name
----
===== Using dpkg =====
Issue the command:
sudo dpkg --purge package_name
To have dpkg ignore dependencies use this instead:
sudo dpkg --purge --ignore-depends package_name
**NOTE**: "--ignore-depends" used to be named "--force-depends".
If more than one package needs to be ignored, separate them with commas:
dpkg --purge --ignore-depends=package1,package2 package_name
**WARNING**: Uninstalling packages using **dpkg**, in most cases, is NOT recommended.
It is better to use a package manager that handles dependencies to ensure that the system is in a consistent state.
For example using **dpkg -r zip** will remove the zip package, but any packages that depend on it will still be installed and may no longer function correctly.