Uninstall Visual Studio Code Completely (Windows,Mac and Linux)


๐Ÿ‘คย Diwas Poudel ย ย  ๐Ÿ•’ 25 Feb 2023 ย ย  ๐Ÿ“ TECH

VS Code is a popular code editor that many developers use and love it. However, it can irritate developers at times, such as when attempting to completely uninstall VS Code. So, if this is your issue, I will provide a proper guide for completely uninstalling vs code in Windows, Mac, and Linux.

Why is Visual Studio Code not completely uninstalled?

Most applications are normally uninstalled by simply uninstalling them through the control panel or with a single uninstalled command in Linux and Mac. However, this does not happen in VS CODE because its settings, plugins, and extensions are stored in a separate location than your VS CODE installation files location. VS Code has done this so that if a developer later encounters a problem with VS Code, the settings will be retained, and if the developer uninstalls and reinstalls then the same settings will be applied automatically, eliminating the need to reconfigure each and every setting on each install/reinstall process.

Uninstalling Visual Studio Code in Windows OS

All of those settings were saved by Windows OS in the AppData (also known as Application Data) Folder. AppData folders are usually hidden.
It provides settings and other information that PC system apps require for operation, as well as settings for third-party applications such as VS Code.
ย 
To uninstall VS Code completely follow the below steps:
๐Ÿ“‘ Note: Here I am using Windows 11 and this works for Windows 10, Windows 8.
ย 
1 Close VS Code Editor ( if you are using it)
2 Go to search, type vscode, and then select "Visual Studio Code" from the list.
3 Right-click on 'Visual Studio Code' and select "Uninstall".Now this will open Control Panel.
search and click on vscode uninstall option
fig. select "uninstall" option
4 In the control panel, look for Visual Studio Code and right-click it. Then, select "Uninstall" and follow the instructions to uninstall it.
uninstall-visual-studio-code-using-control-panel.
fig. Uninstall vscode from the control panel
This will uninstall the vs code software from your computer. But user settings, extensions, and plugins related to vscode are still there. let's delete them as well.
5 Goto windows explorer and type:
 %UserProfile% 
and look for .vscode. If there is no .vscode file in the folder, they are hidden; simply unhide and delete the .vscode folder.
.vscode
fig. remove .vscode folder
6ย  Again go to windows explorer and type:
%AppData%\Code
ย and delete everything contained within it.
delete code contents
fig. remove everything from code folder
7 Again go to Windows Explorer and type:
%LocalAppData%\Programs\Microsoft VS Code
and delete everything from here.
Note that you have installed vscode in another folder then you will not get this folder so in this case, you have to find a location where vscode is installed and there find the "Microsoft VS Code" folder and delete all the contents present inside it.
Also Read: How do I restore the default visual studio code settings?

Uninstalling Visual Studio Code in Windows OS using Third-party Software

If removing vscode becomes too hard, you can use a third-party application to do so. Revo Uninstaller is a popular third-party application for uninstalling applications. It has the ability to completely and cleanly remove applications. It includes both free and paid features. It is always preferable, to begin with, free features.
ย 
Also, there are many other uninstallers you can try it like:

Uninstalling Visual Studio Code in Linux

In a Linux-based machine, simply type the following command into the terminal.
sudo apt-get --purge remove code ย 
It will prompt you for your password; simply enter your password and press 'Enter'.
ย 
๐Ÿ“‘ Note: Don't forget to use the double minus sign before the purge.
ย 
This command will uninstall vscode as well as remove all configuration files.

There may also be packages on which vscode relied that are no longer in use. So, use the "autoremove" command to remove those packages as shown below:
sudo apt-get autoremove
ย 
It will prompt you for your password; simply enter your password and press 'Enter'.
ย 
Now close the terminal and again try to install fresh install visual studio code, it will be installed with default settings and configuration.
You can also combine those two commands in a single line as shown below:
sudo apt-get purge --auto-remove code
๐Ÿ“‘ It is important to note that simply typing sudo apt remove code will not work because it will not delete the user's configuration files. If you want to delete everything, always use the purge command.
You can also use the following dpkg command if apt is not working.
sudo dpkg --remove visual-studio-code
sudo dpkg --purge visual-studio-code

Uninstalling Visual Studio Code in Mac

VS Code settings, extensions, and caches are stored in the following locations:
  • ย ~/Library/Preferences/com.microsoft.VSCode.helper.plist
  • ~/Library/Preferences/com.microsoft.VSCode.plistย 
  • ~/Library/Caches/com.microsoft.VSCode.ShipIt/
  • ~/Library/Caches/com.microsoft.VSCode
  • ~/Library/Application\ Support/Code/
  • ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
  • ~/.vscode/

Here are the steps for uninstalling vscode completely in MacOS:

1 Close VS Code Editor ( if you are using it).

2 In terminal type following rm command one by one with great care.

rm -rf ~/Library/Preferences/com.microsoft.VSCode.helper.plistย 
rm -rf ~/Library/Preferences/com.microsoft.VSCode.plistย 
rm -rf ~/Library/Caches/com.microsoft.VSCode
rm -rf ~/Library/Caches/com.microsoft.VSCode.ShipIt/
rm -rf ~/Library/Application\ Support/Code/
rm -rf ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -rf ~/.vscode/

With the help of the rm command, the files will be deleted. Also -fr or -rf are also used in combination with rm. Actually -fr is the combination of two distinct arguments "-r" and "-f". Its works are as follows:

  • -r: This argument helps to remove files as well as a folder, subfolders, subfiles soon.
  • -f: This argument helps to remove those files and folders without any prompt for confirmation. So, -f helps to skip the permission required to delete the contents.
Also Read: Visual Studio Code vs. Code OSS | What You Should Know

Uninstalling Visual Studio Code in Mac using Third-party Software

You can use a third-party app like PowerMyMac Uninstaller or Delete Apps: Uninstaller to automatically remove the VSCode application along with its settings, extensions, and plugins. They make it easier to find and remove applications. It is also beneficial to delete both apps as well as all associated library files (settings, configurations, caches, log, preferences, and so on)

Can I reinstall vs code after I have completely removed from PC?

After a full uninstallation of Visual Studio Code, it is possible to reinstall it. After you have removed Visual Studio Code and all of its related components, you can get the most recent version from the website and set it up on your machine.

It's important to remember that after reinstalling Visual Studio Code, you'll need to reinstall any extensions or tools you previously used if you want to use those extension with newly installed vscode.

What other programs or data might be impacted if I remove Visual Studio Code?

No it doesnot affect any other applications or files on your computer.

Conclusion

In this manner, we can easily remove vs code software along with its settings, configurations, extensions, caches, and log. From this article, you should have learned why vscode kept those settings and how to completely uninstall vs code.