How to Install Visual Studio Code on Debian 12


Visual Studio Code is a lightweight and powerful source code editor developed by Microsoft. It is a popular choice among developers due to its versatility, extensive features, and ease of use. Visual Studio Code supports multiple programming languages and provides a wide range of extensions and plugins, enabling developers to customize their coding environment according to their needs.

The developers using Visual Studio Code on Debian prioritize VS Code because it enhances their coding experience on the Debian operating system. Debian is known for its stability, security, and open-source nature, making it a preferred choice for many developers. Visual Studio Code seamlessly integrates with Debian, allowing developers to leverage its features and functionalities efficiently.

The Debian users already know about the release of the latest Debian 12 codenamed Bookworm. Today’s post will help the Debian 12 users install VS Code on their latest Bookworm release.

How to Install Visual Studio Code on Debian 12?

Visual Studio can be installed on Debian 12 via the Snap Store and the .deb file. You will learn the complete process of all these methods in the upcoming sections. However, you must follow only one method to have only one version of the VS code at a time.

Method 1: Install Visual Studio Code on Debian 12 Using Snap

The snap store offers numerous packages for all Linux distributions. Visual Studio code is also available through the Snap store. The steps to obtain it from the Snap store are as follows:

Step 1: Install snapd

Your Debian 12 may not be equipped with the snap daemon. Install the snapd using the command:

$ sudo apt install snapd

Step 2: Enable Snap

Once installed, enable the snapd service and start it too. Both tasks can be fulfilled using the command:

$ sudo systemctl enable snapd && sudo systemctl start snapd

Step 3: Install VS Code

Once snapd is installed/enabled, you can get the VS Code via the command.

$ sudo snap install code --classic


The installed version of the VS Code can be launched from the terminal via the command:

$ code

Method 2: Install VS Code on Debian 12 Using the .deb File

Navigate to the Downloads page on the VS Code’s official website and click on the dropdown menu to choose the “.deb” file.

The downloaded .deb file will be available in the download directory of Debian 12:

$ sudo apt install ./<deb file name>

Method 3: Install Visual Studio Code on Debian 12 Using the Flatpak

The flatpak manager can install the VS Code from the flathub’s repository. The flatpak fetches the required package from the repository and then installs it on your system:

Step 1: Install Flatpak

The flatpak manager is not installed by default. However, it can be installed later by the command:

$ sudo apt install flatpak

Step 2: Add the flathub Repository

The flatpak manager is associated with the flathub repository, which can be added to Debian 12 via the command:

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Step 3: Install VS Code

Once you have successfully performed the above two steps, you can install the visual studio code via the command:

$ flatpak install flathub com.visualstudio.code

How to Remove Visual Studio Code From Debian

The commands to remove the VS Code from Debian depend upon the method you adopted for installation. So you need to identify the installation method first and then use one of the following as per your requirement to remove VS Code from Debian 12:

For apt/.deb File’s Method:

$ sudo apt autoremove code


For Snap:

$ sudo snap remove code


For Flatpak:

$ flatpak uninstall flathub com.visualstudio.code

Wrap Up

To install Visual Studio code on Debian 12 (codenamed Bookworm), users can choose from various installation methods, including Microsoft’s Repository, Snap, .deb file, or Flatpak. These methods provide flexibility and convenience, allowing users to select the most suitable option based on their preferences. Whether it’s through the Snap store, .deb file, or Flatpak, installing Visual Studio Code on Debian 12 enables developers to leverage its advanced capabilities and make the most of their coding endeavors.

You have also learned the possible removal methods, which are quite suitable for keeping only one installation at a time.

Print Friendly, PDF & Email
Categories