Error in apt update

Hello guys, i’m new andi i have some issues i’ll list them below and if anyone can help me i’d be grateful.

I’m running Ubuntu 25.04 and every time i use sudo apt update it shows me error

The repository 'https://packages.microsoft.com/repos/vscode stable InRelease' is not signed.

and also shows me this warning

OpenPGP signature verification failed: https://packages.microsoft.com/repos/vscode stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF'

i don’t know what’s that and how did i have too, i’ll post all the output of apt update here:

Get:1 https://packages.microsoft.com/repos/vscode stable InRelease [3,594 B]
Hit:2 https://packages.microsoft.com/repos/code stable InRelease               
Err:1 https://packages.microsoft.com/repos/vscode stable InRelease             
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Hit:3 http://security.ubuntu.com/ubuntu plucky-security InRelease              
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease                  
Hit:5 https://deb.nodesource.com/node_22.x nodistro InRelease                  
Hit:6 http://archive.ubuntu.com/ubuntu plucky InRelease                        
Hit:7 http://archive.ubuntu.com/ubuntu plucky-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu plucky-backports InRelease
Warning: OpenPGP signature verification failed: https://packages.microsoft.com/repos/vscode stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Error: The repository 'https://packages.microsoft.com/repos/vscode stable InRelease' is not signed.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.
Notice: Some sources can be modernized. Run 'apt modernize-sources' to do so.'

Welcome to Ubuntu Discourse :slight_smile:

Is this a fresh install or an upgrade from a previous version?

Steps-To-Take

  1. install inxi, a very handy little tool for system information: sudo apt install inxi
  2. run the following commands separately and post the output here wrapped with code tags: inxi -S and inxi -r

Once we have some more information we can take things further to try and help resolve the issues.

2 Likes

Did you run the command apt modernize-sources suggested in the output and if so, what happened?

1 Like

it’s fresh.
the output :

1: System:
  Host: Moneer Kernel: 6.14.0-24-generic arch: x86_64 bits: 64
  Desktop: GNOME v: 48.0 Distro: Ubuntu 25.04 (Plucky Puffin)

2:Repos:

No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_repos_vscode-plucky.list
    1: deb https://packages.microsoft.com/repos/vscode stable main
    2: deb-src https://packages.microsoft.com/repos/vscode stable main
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/nodesource.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main
  Active apt repos in: /etc/apt/sources.list.d/ubuntu.sources
    1: deb deb-src http://archive.ubuntu.com/ubuntu plucky plucky-updates plucky-backports main restricted universe multiverse
    2: deb deb-src http://security.ubuntu.com/ubuntu/ plucky-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/vscode.sources
    1: deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/repos/code stable main

should i try to run “apt modernize-sources”

Open ‘Software & Updates’ click on ‘Other Software’ and uncheck the lines of microsoft giving the error

Err:1 https://packages.microsoft.com/repos/vscode stable InRelease
The following signatures couldn’t be verified because the public key

then retry updates.

didn’t work i removed both of Microsoft and sill the same.

after i run it this what i see

The following files need modernizing:

  • /etc/apt/sources.list
  • /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_repos_vscode-plucky.list
  • /etc/apt/sources.list.d/google-chrome.list
  • /etc/apt/sources.list.d/nodesource.list

Modernizing will replace .list files with the new .sources format,
add Signed-By values where they can be determined automatically,
and save the old files into .list.bak files.

This command supports the ‘signed-by’ and ‘trusted’ options. If you
have specified other options inside brackets, please transfer them
manually to the output files; see sources.list(5) for a mapping.

For a simulation, respond N in the following prompt.
Rewrite 4 sources? [Y/n]

sudo apt update && apt upgrade
Hit:1 Index of /ubuntu plucky InRelease
Hit:2 Index of /ubuntu plucky-updates InRelease
Hit:3 Index of /ubuntu plucky-backports InRelease
Hit:4 Index of /ubuntu plucky-security InRelease
Get:5 https://packages.microsoft.com/repos/vscode stable InRelease [3,594 B]
Err:5 https://packages.microsoft.com/repos/vscode stable InRelease
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Hit:6 https://packages.microsoft.com/repos/code stable InRelease
Hit:7 https://deb.nodesource.com/node_22.x nodistro InRelease
Hit:8 https://dl.google.com/linux/chrome/deb stable InRelease
Warning: OpenPGP signature verification failed: https://packages.microsoft.com/repos/vscode stable InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Error: The repository ‘https://packages.microsoft.com/repos/vscode stable InRelease’ is not signed.
Notice: Updating from such a repository can’t be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.
Notice: Missing Signed-By in the sources.list(5) entry for ‘https://packages.microsoft.com/repos/vscode

You still have some microsoft sources causing problems.
run again inxi -r to list your sources and verify again with ‘Software & Updates’

As a new user, it would be advisable to become familiar with the OS rather than adding unsupported sources and getting into difficulties.

Ubuntu has a wealth of software within the official repositories.
I would recommend that you spend some time exploring the supported repositories because there is often an alternative to proprietary applications.
The free software option is sometimes superior, it’s worth investigation.

Repos:
  Active apt repos in: /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_repos_vscode-plucky.sources
    1: deb https://packages.microsoft.com/repos/vscode/ stable main
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.sources
    1: deb https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/nodesource.sources
    1: deb https://deb.nodesource.com/node_22.x/ nodistro main
  Active apt repos in: /etc/apt/sources.list.d/ubuntu.sources
    1: deb deb-src http://archive.ubuntu.com/ubuntu plucky plucky-updates plucky-backports main restricted universe multiverse
    2: deb deb-src http://security.ubuntu.com/ubuntu/ plucky-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/vscode.sources
    1: deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/repos/code stable main

Thank you, I’m trying to troubleshooting and get familiar with the OS.

This topic was automatically closed after 38 days. New replies are no longer allowed.