This is a quick little trick to get repositories off of Ubuntu when the software and sources application isn’t working to remove them. I’ve been having problem with all the software managers in Ubuntu including Software Center, Update, and Synaptics for quire some time. So I couldn’t remove them in the conventional way.
This requires deleting the files related to the repository you want to delete in the sources.list.d folder. These files are created when you add repositories in the Ubuntu system to keep track of applications. Once you delete the related files, they’ll no longer show up on the “Software and Updates” list and they won’t be used to search for updates.
Firstly run nautilus in root mode to the folder:
Then you’ll have the folder where you need to delete files related to the application repository you want removed. Select all the files with the said application name and close the folder.
Now run the update command in your command prompt.
sudo apt-get update && sudo apt-get upgrade
This will remove the errors you were having with those repositories and such as “GPG error”. Then you can re-add repositories if you please to solve the problems you were having with the repository.
This may not be the best way to do it and I welcome any suggestions before you go ahead and start flaming.