How to completely uninstall VSCode on macOS

Do you want to completely uninstall VSCode on macOS? Visual Studio Code is a must-have piece of software on many developers’ toolboxes. On MacOS, you can either install it by downloading Visual Studio from its official website or using Homebrew commands. When VSCode does not work as expected and took hours of valuable time to debug, you may want to reinstall it from scratch.

This short article is going to show you how to completely uninstall VSCode and its settings on macOS.

Quit VSCode if it’s running

Before uninstalling Visual Studio Code, you need to make sure that it’s not running, otherwise the process may fail or trigger error messages. You can exit VSCode by right-click on its icon in the Dock and choose Quit. Alternatively, if VSCode is not responsive, you can force close it from the Activity Monitor. If you didn’t know how, follow the instructions below :

  • Launch the Activity Monitor from Dock, Launchpad or Spotlight

  • Type Visual Studio Code in the search box

  • Select the process pertaining to Visual Studio Code

  • Click the X button on the upper left corner

  • Click Quit in the pop-up dialog (if that fails, choose Force Quit).

Force Quit VSCode on macOS

Uninstall VSCode and its settings

With VSCode closed, we can proceed to delete the Visual Studio in your Applications folder.

Delete Visual Studio from Applications

After that, you need to delete VSCode internal data, extensions and settings, too. The command below deletes all folders where VSCode stores its stuffs.

rm -rf ~/Library/Preferences/ 
rm -rf ~/Library/Preferences/ 
rm -rf ~/Library/Caches/
rm -rf ~/Library/Caches/
rm -rf ~/Library/Application\ Support/Code/
rm -rf ~/Library/Saved\ Application\ State/
rm -rf ~/.vscode/

There are potentially also hidden extension directories in your home directories that you may want to get rid of, too, especially when you’re having trouble with your extensions. All these hidden directories starts with .vscode- prefix.

rm -rf ~/.vscode*

Uninstall VSCode with AppCleaner

AppCleaner is an application designed to uninstall any Mac applications along with its residue quickly and efficiently. It basically does the same thing as the commands above, but using a graphical interface.

You don’t have to mess with the commands, just drag VSCode from the Applications folder into AppCleaner interface, it will automatically search for any files that may connect to VSCode. Finally, you just have to click on the Remove button to safely complete the uninstalling process.

Uninstall VSCode with AppCleaner

Note: AppClean cannot remove your extensions data, you have to delete them yourself with this command

rm -rf ~/.vscode*

Uninstall VSCode with Homebrew

If you have installed VSCode with Homebrew (running brew install --cask visual-studio-code in a terminal), you can simply run the following command to uninstall it completely.

brew uninstall --cask visual-studio-code

You still need to remove extensions data as well, by running:

rm -rf ~/.vscode*

We hope that the information above is useful to you. If you’re interested in advanced editing features of VSCode, check out our post on how to enable/disable word wrap in VSCode, How to use LaTeX in VSCode or how to automatically indent your code in Visual Studio Code.

Leave a Comment