Skip to content

Instantly share code, notes, and snippets.

@deild
Created February 14, 2021 16:41
Show Gist options
  • Select an option

  • Save deild/8294ec4e238c7d96d39fcf9bf8f02cae to your computer and use it in GitHub Desktop.

Select an option

Save deild/8294ec4e238c7d96d39fcf9bf8f02cae to your computer and use it in GitHub Desktop.
How can you completely remove a package on ubuntu ?

You first check out for the name of the package you want to remove:

dpkg --list

Then remove the given package

sudo apt-get remove package_name

Purge any related code

sudo apt-get purge package_name

Then Autoremove

sudo apt-get autoremove

Finally, do a clean so you check everything is correctly removed

sudo apt-get clean

You would like to check at the packages list whether the one you wanted to remove is not listed anymore, but it is optional.

Have a nice day,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment