1

Installed Visual Studio Code (64bit deb package) using the gdebi installer, now I want to uninstall it properly.

I tried the following to no avail -

  • remove installation option in gdebi ----> does not work
  • remove option from Software Center -----> does not work
  • sudo dpkg --purge code ----> dpkg: warning: ignoring request to remove code which isn't installed

Looks like I may have a broken package now. How do I get rid of it manually?

3 Answers 3

2

In the terminal, sudo dpkg -P code should do it... although the gdebi Uninstall option should have worked for you too. Why do you wish to uninstall it, as it's a good editor, especially for source code.

Update #1:

Since Code had been installed using umake, it required sudo umake --remove ide visual-studio-code to uninstall it properly.

9
  • 1
    I just want to install the updated version :-) And using that command option is not working. I got output saying - Purging configuration files for code but then when I clicked VSCode launcher it opened successfully.
    – Saikat
    Aug 11, 2017 at 14:56
  • You can install the newer version right over the old version... or if you've got a current enough version of Code, you can just go to the Help menu an select Check for Updates.
    – heynnema
    Aug 11, 2017 at 15:01
  • Check for Updates takes me to download page. And installing newer version does not uninstall the old one.
    – Saikat
    Aug 11, 2017 at 15:25
  • Installing the newer version should overwrite the old version. In your Unity dashboard, if you type code, do you get TWO icons that show up?
    – heynnema
    Aug 11, 2017 at 15:30
  • You can try sudo dpkg -P visual-studio-code.
    – heynnema
    Aug 11, 2017 at 15:36
2

On my Ubuntu 18.10, I installed vscode as a snap. I was able to remove it with:

sudo snap remove vscode

2
  • Welcome to Ask Ubuntu and for your interest in this site. Unfortunately, the original post did not indicate that snap was used to install the package so snap remove isn't going to be useful.
    – CentaurusA
    Jan 30, 2019 at 2:43
  • if you use this then work fine in ubuntu 20.04 LTS sudo snap remove code
    – Kashif
    Oct 7, 2020 at 8:19
1

It was my fault!

I installed VSCode using umake but wrongly assumed that I had used gdebi. I finally found out from the launcher file that the executable is in Exec=/home/<username>/.local/share/umake/ide/visual-studio-code/bin/code.

I just had to trigger sudo umake --remove ide visual-studio-code to get rid of it completely!

1
  • 1
    Glad you finally got it uninstalled! That command was also in the first web site link that I gave you in chat.
    – heynnema
    Aug 13, 2017 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.