How do I remove VS Code & settings from Ubuntu?

113,459

Solution 1

Try renaming ~/.config/Code/User/settings.json.

Or just move/delete the folders ~/.config/Code and ~/.vscode.

You may want to backup any code snippets in ~/.config/Code/User/snippets/

See also: Visual Studio Code User and Workspace Settings

Solution 2

Remove software

  • If you installed via Snap:

    $sudo snap remove vscode

  • If you installed via apt:

    $sudo apt-get purge code

  • If you installed via Ubuntu Software, open Ubuntu Software, look for the app in the installed category, and click on remove.

Remove settings

$cd ~ && rm -rf .vscode && rm -rf .config/Code

Solution 3

Go to /usr/share and find the installation folder of VS Code, which is code-insiders/ for an insider preview and code for a regular installation. Remove the folder which you don't find necessary.
Don't forget to remove the start menu entry in /usr/share/applications/

To remove the application settings go to your home folder and remove the .vscode folder.


Also if you want to backup your user settings before all this, try the settings sync extension.

Share:
113,459

Related videos on Youtube

Brandon
Author by

Brandon

Updated on September 18, 2022

Comments

  • Brandon
    Brandon over 1 year

    VS Code is giving me some problems w/ formatting. I'd like to fully remove it and re-install.

    However, each time I remove it and re-install, when I open it, it still remembers what I had opened.

    This leads me to believe there's a settings file somewhere I'm missing.

    Methods I've tried:

    1. sudo dpkg --purge code & sudo dpkg --remove code
    2. Uninstalling via gdebi
    3. Full removal via synaptic package manager
    4. Cussing, swearing, etc.

    No dice. What am I missing?

  • Brandon
    Brandon over 7 years
    A+. Did the trick & fixed my VSCode bug. For posterity, I'll add that I also deleted ~/.vscode. Not sure if that mattered, but didn't seem to hurt anything.
  • Brandon
    Brandon over 7 years
    ^^to clarify, I deleted the entire ~/.config/Code folder, not just the settings.json.
  • Martin Meeser
    Martin Meeser about 5 years
    IMHO this should be the accepted answer, worked perfectly, also very precise
  • Petr 'PePa' Pavel
    Petr 'PePa' Pavel about 3 years
    I had to run $sudo snap remove code (not vscode).