Skip to content
>GLB_
Go back

Why apt upgrade Didn’t Update VS Code (and What Actually Happened)

Problem Statement

sudo apt update  sudo apt upgrade

But Visual Studio Code (Visual Studio Code) remains outdated.

sudo apt install --only-upgrade code

it updates successfully.

This behavior is not accidental. It is a consequence of how APT resolves dependencies under different upgrade strategies.


Key Concept: APT Upgrade Policies

APT provides multiple upgrade strategies with different levels of aggressiveness:

CommandBehavior
apt upgradeUpgrades packages without installing or removing dependencies
apt full-upgradeAllows installing/removing dependencies to complete upgrades
apt install --only-upgrade <pkg>Forces upgrade of a specific package, allowing dependency resolution

What Happened in This Case

During the upgrade attempt, APT reported:

The following NEW packages will be installed:    socat

This is the critical detail.

The new version of VS Code introduced a new dependency: socat.

Under apt upgrade, APT refused to proceed because:

As a result:


Why --only-upgrade Worked

When you executed:

sudo apt install --only-upgrade code

APT switched to a targeted resolution strategy:

Result:

code 1.114.0 → 1.117.0

Dependency Evolution in Packages

This situation is common when:

In Debian-based systems (like Ubuntu), package metadata defines:

If a new version modifies Depends, upgrading may require additional packages.


Correct Upgrade Strategies

Safe Global Upgrade

sudo apt upgrade

Use when you want minimal system changes.


Complete System Upgrade

sudo apt full-upgrade

Use when:


Targeted Package Upgrade

sudo apt install --only-upgrade code

Use when:


Verification

After upgrade:

code --version

Share this post:

Previous Post
Batch Means Two Different Things: Why the Term Became Confusing in Data Engineering
Next Post
Tracking Subdomains in PostHog Without Breaking User Journeys