Uninstall .deb package

I am trying to remove visual studio code that is in code_1.72.2-1665614327_amd64.deb.

I used this to install.

gdebi code_1.72.2-1665614327_amd64.deb

I have tried this to un-install.

andy@7 ~> sudo dpkg -r code_1.72.2-1665614327_amd64.deb
dpkg: error: you must specify packages by their own names, not by quoting the names of the files they come in

According to this, there should be a /usr/share/code/ directory, but it does not exist.

Does that mean that the .deb was not installed?
No_Dir

Hi think r needs name as here: Seems to be whole file install and just name to remove. Towards bottom.

https://phoenixnap.com/kb/dpkg-command

1 Like

The package name for 'visual studio' is 'code'

so

sudo apt purge code

will remove the package, configs and any other traces of visual studio :slight_smile:

sudo apt purge code
Reading package lists... Done
Building dependency tree       
Reading state information... Done

No apt package "code", but there is a snap with that name.
Try "snap install code"

E: Unable to locate package code

I do not think it was ever installed.

1 Like

Correct.
This was the proof you were looking for :wink:

1 Like