Uninstall an Ubuntu app installed from a deb package

  1. Find the package name
  2. Uninstall it
  3. Completely remove it

If you have installed an Ubuntu app from a .deb package, you can uninstall it using apt and dpkg.

Find the package name

If you still have the .deb file:

1
dpkg-deb -f your-app.deb Package

For example:

1
dpkg-deb -f code.deb Package

It might return:

1
code

Tip: If you don’t have the .deb file, search your installed packages:

1
dpkg -l | grep -i "app-name"

For example, if you installed Visual Studio Code:

1
dpkg -l | grep -i code

You might see:

1
ii  code 1.134.0-1787078834 amd64 Code editing. Redefined.

Uninstall it

Use:

1
sudo apt remove package-name

For example:

1
sudo apt remove code

This removes the application but generally keeps its configuration files.

Completely remove it

If you want to remove the package’s system-level configuration files:

1
sudo apt purge package-name

Then clean up unused dependencies:

1
sudo apt autoremove

It is generally recommended to use apt remove rather than manually deleting files. This properly removes the files registered by the .deb package.