This documents two issues encountered when upgrading Pop!_OS from 22.04 (Jammy) to 24.04 (Noble) using pop-upgrade, and how they were resolved.
Running the upgrade command failed with:
❯ pop-upgrade release upgrade -f
...
Release upgrade status: release upgrade aborted: failed to fetch apt URIs to fetch
Checking the pop-upgrade journal logs revealed the actual cause:
journalctl -u pop-upgrade -b | grep -i "fail\|error\|uri"[ERROR] release/mod.rs:855: failed to fetch packages: failed to fetch apt URIs to fetch:
failed to fetch package URIs from apt-get full-upgrade: checksum not found in output:
'https://packages.microsoft.com/repos/code/pool/main/c/code/code_1.109.4-1771257466_amd64.deb'
The Microsoft VS Code repository was producing a checksum mismatch, causing the entire upgrade process to abort.
Temporarily disable the VS Code repository before upgrading:
sudo mv /etc/apt/sources.list.d/vscode.sources /etc/apt/sources.list.d/vscode.sources.bak
sudo apt clean
sudo apt update
pop-upgrade release upgrade -fThe upgrade completed successfully after disabling it.
Note: Other third-party repos that explicitly reference the
jammycodename (e.g. Spotify, PPAs withjammyin their filename) may cause similar issues and should also be disabled before upgrading.
After restoring the VS Code repository and running sudo apt update:
Err:1 https://packages.microsoft.com/repos/code stable InRelease
The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY EB3E94ADBE1229CF
W: GPG error: https://packages.microsoft.com/repos/code stable InRelease: ...
E: The repository 'https://packages.microsoft.com/repos/code stable InRelease' is not signed.
Inspecting the repository source file:
cat /etc/apt/sources.list.d/vscode.sourcesTypes: deb
URIs: https://packages.microsoft.com/repos/code
Suites: stable
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/microsoft.gpg
The file expected the Microsoft GPG key at /usr/share/keyrings/microsoft.gpg, but that file had been lost during the upgrade.
Re-download the Microsoft GPG key and place it where the source file expects it:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/microsoft.gpg > /dev/null
sudo apt update
sudo apt upgradeVS Code was updated successfully.
# Before upgrading: disable VS Code repo
sudo mv /etc/apt/sources.list.d/vscode.sources /etc/apt/sources.list.d/vscode.sources.bak
# Run the upgrade
sudo apt clean && sudo apt update
pop-upgrade release upgrade -f
# After upgrading: restore VS Code repo and re-import the GPG key
sudo mv /etc/apt/sources.list.d/vscode.sources.bak /etc/apt/sources.list.d/vscode.sources
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/microsoft.gpg > /dev/null
sudo apt update && sudo apt upgrade