How to uninstall a .deb package?
Manually installed packages appear in the Software Centre, along with all the others. Just search the software centre for your package and remove it there.
You may have to click on "Show N technical items"
Along with this, there are a few other methods:
Synaptic:
- Go to System → Administration → Synaptic Package Manager
- Click the Status button and select "Installed (local or obsolete)"
- Right click a package and select "mark for removal".
Click the Apply button.
This will have the benefit of listing all of your manually installed packages:
Command Line
You can either use
sudo apt-get remove packagename
if you know the name of the package, or if you don't, search for it usingapt-cache search crazy-app
and then remove it using apt getYou can also use
dpkg --remove packagename
.
This will also let you know if there are any unneeded packages left on your system, which were possibly installed as dependencies of your .deb package. Use sudo apt-get autoremove
to get rid of them.
The command to facilitate that is:
sudo dpkg -r package_name
Also if you need to remove them forcefully
sudo dpkg -r --force-all pkg_name
Every solution here assumes you know or can find the name of the package, but none provide how to remove a package if all you have is the deb. To that end, the below command will extract the package name from the deb and remove that package name.
dpkg -r $(dpkg -f your-file-here.deb Package)
NB: this does not confirm that the package being removed is the exact version described by the deb - be careful.