In all our previous articles, we taught you how to add repositories to your system so that you can install third party software. What about the other way round? There are times when you uninstall an application and have no more use for its repository. It is a good idea to remove the repository from your system and keep your computer spick and span.
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
gksu gedit /etc/apt/sources.list
- Scroll down to the repository that you want to remove.
- Delete the line of code.
- Save the file and exit.
- Update your system:
sudo apt-get update
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.