All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 2

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu

Introduction

If you identify as a programmer and developer and have worked with an integrated development environment (IDE), you are probably well aware of the popular Microsoft Visual Studio Code.

Visual Studio Code is a code editor . End-users can take advantage of various development, debugging, and testing features, including embedded Git control, syntax highlighting, auto code completion, code refactoring, and snippets. Visual Studio code supports thousands of extensions and offers features like version control, which makes collaboration highly convenient.

Visual Studio Code is open source and supports all major operating systems. In this article, you will learn various ways to install Microsoft Visual Studio Code on your Ubuntu system.

Prerequisites

Ubuntu or any other Linux-based system

Terminal Access

A user account with root/sudo privileges.

Internet Access

Note: Although the commands used in this tutorial are specifically for the Ubuntu system, all the methods are also valid for any other Linux-based system.

Install and Uninstall Visual Studio Code Using the apt Package

Update & Upgrade Your System

Before getting into the installation, make sure to update your system repository.

Run the following commands to update and upgrade your system.

sudo apt update
sudo apt upgrade

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 3

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 4

Or you can also run this aggregate command to do the same in one line.

sudo apt update && sudo apt upgrade -y

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 5

Resolve Package Dependencies

Install the necessary package dependencies for smooth installation using the following command.

sudo apt install software-properties-common apt-transport-https wget

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 6

Get Microsoft’s GPG Key

Import Microsoft’s GPG key with the following import command.

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 7

Enable the Visual Studio Code Repository

Enable the Visual Studio Code repository with the following command.

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 8

Install Visual Studio Code

When the repository is enabled, you can finally install the Visual Studio Code package with the following command.

sudo apt install code

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 9

Check the Visual Studio Code Installation Version

Check your visual studio code version with the following command.

code –version

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 10

If your version is not the latest, you can again update and upgrade your system to ensure your Visual Studio Code is the latest version.

Uninstall Visual Studio Code

Run the following command to uninstall your visual studio code.

sudo apt remove code

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 11

Install and Uninstall Visual Studio Code Using the Snap Package

Another option for VS Code installation is to install it through its self-contained and self-managed snap package.

Run the following command to install Visual Studio Code using the snap package.

sudo snap install –classic code

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 12

To uninstall the visual studio code, remove its snap using the following command.

sudo snap remove code

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 13

Install and Uninstall Visual Studio Code Using the Graphical User Interface

You can also directly install Visual Studio Code using the Ubuntu Software Center. Simply open the Ubuntu Software Center and search for Visual Studio Code, then open it.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 14

Click on Install and authenticate.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 15

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 16

You can uninstall/remove the installed Visual Studio Code from the Ubuntu Software Center. Just click on Remove after opening it from the installed tab.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 17

And click on Remove again when prompted.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 18

Start and Configure Your Visual Studio Code

As an IDE, Visual Studio Code provides hundreds of language extensions.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 19

After installation, you can open Visual Studio Code from the applications and start customizing.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 20

And then install your desired extensions.

All the Ways to Install and Uninstall Visual Studio Code on Ubuntu 21

Conclusion

Visual Studio Code installation on Ubuntu is an easy process. This tutorial provides numerous methods for installing Visual Studio Code. You may select and choose one that is most convenient for you.

As an Ubuntu user, Visual Studio Code is not your only option for a code editor. There are multiple editors like Sublime Text and Atom available to you. You can try out different editors for the best experience.

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.

Leave a Comment

Your email address will not be published. Required fields are marked *