Table of Contents
Ubuntu - Packages - Remove a package
Aptitude is preferred, but other approaches can be used if desired.
Using aptitude
Issue the command:
sudo aptitude remove package_name
Multiple packages to be removed at once. Separated each package_name with a space.
Use the purge option to remove the package configuration files as well. This may or may not be the desired effect, so use with caution.
sudo aptitude purge package_name
Using dpkg
Issue the command:
sudo dpkg -r 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.
On Redhat - using rpm
rpm -e package_name
WARNING: This will also remove any dependencies. To prevent this, it's better to remove packages using:
rpm -e --nodeps package_name