How to Remove Repositories In Ubuntu

Spread the love

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.

  1. Open your sources.list file
gksu gedit /etc/apt/sources.list
  1. Scroll down to the repository that you want to remove.
  2. Delete the line of code.
  3. Save the file and exit.
  4. 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.

  1. Open Synaptic Package Manager (System -> Administration -> Synaptic Package Manager)
  2. In the menu, go to “Settings -> Repositories”. Click on the “Other Software” tab.
  3. Scroll down the list till you find the repository that you want to remove. Highlight it and click the Remove button

  1. Click Close.

When you are back to the Synaptic main screen, click the Reload button to update your system.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Damien Oh

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Comments are closed