Ubuntu – How to delete/remove manually apt added repositories?

aptpackage-managementrepositoryupdates

Please help me: I added this repositories manually and i cant remove them

echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0/ /' > /etc/apt/sources.list.d/vertex-theme.list

wget http://download.opensuse.org/repositories/home:Horst3180/Debian_8.0/Release.key

I tried to use removing the key using apt-key list and then removing using the id, it successfully removed the key but when i use apt update i get this output:

W: GPG error: http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A7D1D38BEB6D886
E: The repository 'http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0  Release' is not 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.

I just want to be able to run apt update normally like when a fresh OS install was made

Best Answer

Simply remove the created .list file:

sudo rm /etc/apt/sources.list.d/vertex-theme.list
sudo rm /etc/apt/sources.list.d/vertex-theme.list.save

After that run and update and maybe even a dist upgrade:

sudo apt update
sudo apt dist-upgrade

Since you already removed the key you have nothing more to do.

Related Question