How do I uninstall Visual Studio Code?
Solution 1
I did it with the following command:
sudo apt purge code
to uninstall the program and then:
sudo apt autoremove
to remove the menu items/shortcuts etc as @Joe suggested.
I hope it helps!
Solution 2
sudo dpkg --remove visual-studio-code
This will remove the software (including the Dash icon/desktop entry).
I think that this method will leave the configuration information around (if you re-install); there's also a purge option on dpkg that will remove this information as well.
sudo dpkg --purge visual-studio-code
Solution 3
As none of the above answer has been accepted so I am assuming it didn't solve your problem. If you cannot find it with apt
or dpkg
then most likely it was installed with snap
as was in my case. To remove it just type:
snap remove code
Solution 4
I had to update VS Code from the Software Center to uninstall it properly. -_-
After that, this worked perfectly:
sudo apt-get purge code
Solution 5
I was running into the very same problem today. None of the provided answers solved it for me. So I tried:
$ which visual-studio-code
/home/tim/.local/share/umake/bin/visual-studio-code
I was having a look at that directory and realized it was a symlink to
/home/tim/.local/share/umake/bin/visual-studio-code ->
/home/tim/.local/share/umake/ide/visual-studio-code/bin/code*
So I was able to remove it with
umake ide visual-studio-code --remove
(Note how I use umake ide
and not umake web
)
Related videos on Youtube
JacobTheDev
Updated on September 18, 2022Comments
-
JacobTheDev almost 2 years
I installed Visual Studio Code a while ago, and I'm now trying to remove it. I don't remember how I installed it, but everything I've tried to remove it doesn't work. Things I've tried:
sudo umake web visual-studio-code --remove
: This says "can't remove because you don't have it installed," which I know isn't true. I was able to find the files in /home/jacob/.local/share/umake/web/visual-studio-code. Deleting those files, by the way, stops the application from running, but doesn't remove the icon from the launcher. I restored the files once I figured that out.- Removing via Software Center: It does show up in Software Center, but when I hit "remove" nothing happens.
Any other suggestions?
-
T04435 about 8 yearsCheck on the folder, if you have a uninstall.sh file
-
Daniel almost 6 yearsYou may also want to remove
/etc/apt/sources.list.d/vscode.list
to drop the vscode repo. -
Felix Orinda about 2 yearsTo uninstall vscode in debian distros:
sudo apt purge code
then remove the plugins byrm -rf /home/<user>/.vscode
then remove all the configuration by also removing the config byrm -rf /home/<user>/.config/Code
A link to the same code.visualstudio.com/docs/setup/uninstall
-
JacobTheDev about 8 yearsThanks, but I get the following error:
dpkg: warning: ignoring request to remove visual-studio-code which isn't installed
. This is driving me crazy, I can see it installed -_- -
JacobTheDev about 8 yearsOutput:
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package visual-studio-code
-
yucer almost 7 yearsIt works for me. But only with
code
instead ofvisual-studio-code
(code_1.14.0-1499719149_amd64.deb) -
yucer almost 7 yearstry with
code
instead ofvisual-studio-code
-
Jacob van Lingen about 6 yearsI had to uninstall it, to update VS Code properly :P.
-
user309383 about 5 yearsAFAIK on Ubuntu this is practically the same as apt solution (perhaps more low level than APT method). However, I believe this is better solution if you have installed VS code via .deb package originally (e.g. downloaded .deb from VS code web site). This shall be applicable to older Ubuntus. More recent ubuntu allow installing code using snap and removal is better done from app manager.
-
user309383 about 5 yearsNever tried dev packages installation frameworks, but this is good hint if one used such method to install VScode.
-
Admin almost 5 yearsAfter
sudo apt-get purge code
, I just had to runsudo apt autoremove
to remove the menu items/shortcuts and stuff like that. -
Admin almost 5 yearsAfter
sudo apt-get purge code
, I had to runsudo apt autoremove
to remove the menu items/shortcuts and stuff like that. -
haralambov almost 5 yearsGood point. Answer updated. Cheers!
-
vohrahul over 4 yearsThis should be the correct answer. Thanks mate. Saved me a lot of time.
-
Philipp about 4 yearsRunning those commands already removed the shortcut for me. After uninstalling I installed VSCode again but this time via
sudo snap install code --classic
- snap has more recent versions and keeps it updated automatically.