Here’s how you can do it easily, in less than a minute:

Removing repository from the sources.list file

If you have previously added the repository via the sources.list file, the best way to remove the repository is to remove the respective line from your sources.list file. Open your sources.list file Scroll down to the repository that you want to remove. Delete the line of code. Save the file and exit. Update your system: Done!

Removing repository from Synaptic Package Manager

If you have used the command ‘add-apt-repository’ to add repository to your system, you will not be able to find the line in your sources.list file. In such case, you might want to remove your repository via the Synaptic Package Manager. Open Synaptic Package Manager (System -> Administration -> Synaptic Package Manager) In the menu, go to  Settings -> Repositories. Click on the Other Software tab. Scroll down the list till you find the repository that you want to remove. Highlight it and click the Remove button

Click Close. When you are back to the Synaptic main screen, click the Reload button to update your system. That’s it. Snippet is a short tip/trick or just a quick fix for a certain issue that we discover from time to time. Don’t forget to subscribe to our RSS feed for more up to date tutorials/tips/tricks.