Are you finding it difficult to update Visual Studio Code on Debian 12?
This is a typical challenge for users who are new to the Debian ecosystem, especially when it comes to performing tasks like application updates.
But worry not, as we’ve got you covered.
In this step-by-step, we will guide you on updating Visual Studio Code on Debian 12 quickly and easily.
Let’s dive right in!
What You’ll Need?
As we are dealing with updating Visual Studio Code, which is a simple process, having the below prerequisites is enough:
- A working Debian 12 Bookworm system (guide)
- Sudo access (guide)
- A stable, active Internet connection
- A basic understanding of Linux terminal commands (guide)
You’re ready to proceed further if you have all the above prerequisites. Continue reading to find out how to update Visual Studio Code on Debian 12.
How to Update Visual Studio Code on Debian 12: Step-by-Step
Step 1: Update the Debian 12 APT Package Database
Updating the Debian 12 APT Package Database is important as it is often considered a good practice while installing new or updating existing packages.
Here are steps on how to do it:
- Open the terminal on your device running Debian 12 and log in as a root user by entering the following command. Enter the password to proceed or create one if prompted:
- Once logged in as the root user, enter the below command to update the APT Package database with available latest versions of all packages:
sudo apt update
Note: Enter ‘Y’ when prompted to finish upgrading the Debian 12 APT Package Database. If there is none, then it means the APT Package Database is already updated.
Step 2: Verify the Installed Version of Visual Studio Code
The reason for verifying the Visual Studio Code version is to cross-check if it is already the latest version. Here are steps on how to do so:
- On your terminal, enter the following command, which displays the current version of Visual Studio Code:
You can see that the code displays the current version of Visual Studio Code, which is 1.79.2 for our instance. To determine if it is the latest version, proceed to the next step.
Step 3: Check for a Newer Version of Visual Studio Code
With the current version available, you can head to the Visual Studio Code official download page to see if there’s a new version available.
However, this procedure might not suit all, as some might find it difficult.
Hence, here are the steps to find out if a newer version is available to the Visual Studio Code using the terminal.
- Open the Terminal and log in as the root user (To log in as the root user, refer to Step 1).
- Once logged in as a root user, enter the following command to check if a newer version of Visual Studio Code is available:
apt list --upgradable | grep code
As you can see from the screenshot, the newer version, “Visual Studio Code – 1.81” is available to download.
Note: If you find an output “The current version is the latest” or “No newer versions are available,” then you’re already running the latest version.
If you’re not on the latest version, proceed with the next step.
Step 4: Update Visual Studio Code to Latest Version
While proceeding with this step, ensure you have proper internet access, and here are the steps to update Visual Studio.
- If you have closed the terminal, like every step, open the Terminal and log in as a root user.
- Once logged in as a root user, enter the following command to update Visual Studio to the latest version:
sudo apt install code
Note: Enter ‘Y’ when prompted, as you must provide access to additional disk space. If there are no prompts, don’t worry, as the updating process is automated and is provided with all permissions.
Before using the Visual Studio Code, verify if it has been updated by proceeding to the next step.
Step 5: Check if the Visual Studio Code Is Updated
There are multiple ways to check if Visual Studio Code has been updated to the latest version. However, most of them involve a lot of steps and are confusing.
Here is how to find out if Visual Studio Code is updated easily.
- In the terminal, enter the following command, which displays the current version of Visual Studio:
If you notice, we have executed the same command under Step 2.
On closer examination, the previous output has displayed the version as 1.79.2, and now it is 1.81, which means you have updated successfully.
Note: If the version doesn’t change, reboot your device and perform Step 5 again. If the issue persists, repeat all steps.
Congratulations on updating your Visual Studio Code to the latest version!
While the process might have seemed challenging initially, our tutorial has hopefully made it seamless for you by breaking it down into simple steps.
If none of the steps help update your Visual Studio Code, there might be an issue with the package. In such case, you will need to reinstall the Visual Studio Code application again or contact Debian user forums or Microsoft VS Code GitHub for better assistance.