The answer from Sagar Rakshe is correct.
Here I explain how to perform it manually.
Remove the repository
First, identify your wrong file in /etc/apt/sources.list.d
(you may also have to check the main file /etc/apt/sources.list
)
cd /etc/apt/sources.list.d
head *.list
Then, rename the file to disable it:
sudo mv WRONGFILE.list WRONGFILE.list.backup
Or instead of renaming the file, create a backup directory and move the file there:
sudo mkdir backup_on_date_YYYMMDD
sudo mv WRONGFILE.list backup_on_date_YYYMMDD
For your information, add-apt-repository
is a python script adding or commenting lines in your *.list
files. Personally I prefer to handle myself these operations in order to keep clear & secure *.list
files.
Remove the package signing keys
Show the installed apt keys with apt-key list
and find the key for the repo you want to remove, for example:
pub 2048R/5044912E 2010-02-11
uid Dropbox Automatic Signing Key <[email protected]>
You can then use sudo apt-key del 5044912E
to remove this key.