Apt Update Gives Error for Wireguard

I'm getting the following error when trying to run apt update:

sudo apt update
Hit:1 http://ro-mirrors.evowise.com/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://ro-mirrors.evowise.com/ubuntu focal-backports InRelease           
Hit:4 http://ro-mirrors.evowise.com/ubuntu focal-updates InRelease             
Hit:5 http://ppa.launchpad.net/bashtop-monitor/bashtop/ubuntu focal InRelease  
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease               
Hit:7 http://archive.canonical.com/ubuntu focal InRelease                
Hit:8 http://ppa.launchpad.net/cappelikan/ppa/ubuntu focal InRelease     
Err:9 http://ppa.launchpad.net/wireguard/wireguard/ubuntu focal InRelease
  403  Forbidden [IP: 91.189.95.83 80]
Reading package lists... Done                      
E: Failed to fetch http://ppa.launchpad.net/wireguard/wireguard/ubuntu/dists/focal/InRelease  403  Forbidden [IP: 91.189.95.83 80]
E: The repository 'http://ppa.launchpad.net/wireguard/wireguard/ubuntu focal InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Any pointers? I haven't changed anything from last week when I ran the command (work machine so I didn't use it over the weekend).

General info: XPS13 | Ubuntu 20.04 | 5.7.1 kernel | Gnome 3.36.3


The mentioned PPA owner does not provide packages anymore.

You have to remove it by

sudo apt-add-repository -r ppa:wireguard/wireguard

Instead you have to add universe pocket and install the package from it:

sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install wireguard

In the link https://launchpad.net/~wireguard it says:

This formerly was responsible for producing a PPA for WireGuard on Ubuntu. That functionality has now been folded into Ubuntu itself, so our old PPA has been removed. Simply run apt install wireguard on all Ubuntus ≥ 16.04.

Each apt-get update command is trying to fetch the package information but fails because it has been removed. After removing the ppa from your system using the following command the error should be gone:

sudo add-apt-repository --remove ppa:wireguard/wireguard

Also, it is generally recommended to avoid using PPAs if the package is available on the official archive mirrors of ubuntu unless you need a different version.


For me the existing answers didn't work as I still got the error with apt-get update. I needed to remove the sources by hand by removing the files under /etc/apt/sources.list.d/:

root@ubuntu-p:~# grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic main universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-security main universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates main
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates universe
/etc/apt/sources.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
/etc/apt/sources.list:# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:deb http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:deb http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
root@ubuntu-p:~# ls /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list  /etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save

root@ubuntu-p:~# rm /etc/apt/sources.list.d/*wireguard*

root@ubuntu-p:~# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
root@ubuntu-p:~#