HomeLinuxTake away Software program Repositories from Ubuntu 😎

Take away Software program Repositories from Ubuntu [3 Easy Ways] 😎


You’ll be able to add exterior repositories in Ubuntu to entry packages unavailable within the official repositories.

For instance, when you set up Courageous browser in Ubuntu, you add its repository to your system. When you add a PPA, that’s added as an exterior repository too.

When you do not want the particular software program, you take away it. Nonetheless, the exterior repository continues to be added. You’ll be able to, and also you also needs to take away it to maintain your system pristine.

Ubuntu helps you to take away a software program repository simply. There are alternative ways to try this:

  1. Utilizing apt-add-repository command to take away the repository
  2. Utilizing GUI to take away the repository (for desktop customers)
  3. By modifying the file contents of the /and so on/apt/sources.checklist file (for consultants)

However earlier than that, I extremely advise getting conversant in the idea of package deal managers and repositories in case you are new to this idea.

What’s a Package deal Supervisor in Linux?

Study packaging system and package deal managers in Linux. You’ll find out how do they work and how much package deal managers obtainable.

Methodology 1. Take away the repository utilizing apt 🤖

Do you know you can too use the apt command to take away repositories? Nicely, technically, it isn’t a part of the core apt command however it works in comparable style.

You should utilize the add-apt-repository or apt-add-repository instructions (each characterize the identical command) whereas coping with exterior repositories.

First, checklist the added repositories utilizing the next command:

apt-add-repository --list
list enabled repositories in Ubuntu

As soon as completed, you should use the apt-add-repository command with the -r flag in proven method to take away the listing:

sudo apt-add-repository -r repo_name

For instance, if I need to take away the yarn repository, I must use the next command:

sudo add-apt-repository -r deb https://dl.yarnpkg.com/debian/ secure foremost
Remove repository using the apt-add-repository command in Ubuntu

Press the Enter key for affirmation.

Subsequent, replace the repositories utilizing the next:

sudo apt replace

And now, when you checklist enabled repositories, you will not discover the eliminated repository right here:

apt-add-repository --list
confirm repository removal process by listing enabled repositories in Ubuntu

There you will have it!

Utilizing apt Instructions in Linux [Ultimate Guide]

This information exhibits you the best way to use apt instructions in Linux with examples with the intention to handle packages successfully.

Methodology 2. Take away the software program repository in Ubuntu utilizing GUI 🖥️

🚧

Eradicating a repository you understand nothing about shouldn’t be really helpful as it might prohibit you from putting in your favourite package deal sooner or later, so be sure you know what you might be as much as.

Being the most effective distros for freshmen, You should utilize GUI to take away the repository without having the terminal.

To take action, first, open the software program and updates the app from the system menu:

search for software and updates from the system menu

Now, click on on Different Software program part, and it’ll checklist PPAs and exterior repositories in your system.

Those listed as checked ✅ are enabled ones.

To take away a repository, you’d should observe three easy steps:

  • Choose a repository that must be eliminated
  • Click on on the take away button
  • And eventually, hit the shut button
Disable repository from Ubuntu

When you click on on the shut button, it is going to open a immediate asking you to replace the knowledge as you make modifications.

Merely click on on the Reload button:

Click on reload to after removing repository from Ubuntu and save changes

Alternatively, you possibly can replace the repository from the command line to take impact from the modifications:

sudo apt replace

Methodology 3. Take away the repository by eradicating its listing (for consultants 🧑‍💻)

Beforehand, I defined how you would use instruments (GUI and CLI) to take away a repository; right here, you’ll modify the system listing (/and so on/apt/sources.checklist.d) liable for managing repositories.

So first, change your working listing to sources.checklist.d and checklist its contents:

cd /and so on/apt/sources.checklist.d/ && ls
list contents of sources.list.d directory

Right here, you will see the checklist of all of the repositories.

When you discover fastidiously, there can be two information for one repo. As soon as with the .checklist extension and one with the .save extension.

You’ll have to take away the one having the .checklist extension:

sudo rm Repo_name.checklist

For instance, right here, I eliminated the node repo utilizing the command beneath:

sudo rm nodesource.checklist
remove repository by removing the repository directory in Ubuntu

To take impact from the modifications, replace the repository index with:

sudo apt replace

Wish to know extra in regards to the sources.checklist? Learn this text.

What’s the Use of sources.checklist File in Ubuntu Linux?

Understanding the idea of sources.checklist in Ubuntu will assist you perceive and repair frequent replace errors in Ubuntu.

Further Step: Take away GPG keys after eradicating the repository (for superior customers)

When you want to take away the GPG keys after eradicating the repository, this is the way you do it.

First, checklist the prevailing GPG keys utilizing the next command:

apt-key checklist

Now, the output could appear complicated to some customers.

This is what to recollect:

  • The GPG key identify can be positioned above the dashed line (—-)
  • The general public secret is within the second line

For instance, this is the related knowledge of the Chrome GPG key:

list GPG keys in Ubuntu

To take away the GPG key, you should use the final two strings of the general public key (with none area).

For instance, this is how I’ll take away the GPG key of the Chrome browser utilizing the final two strings of its public key (D38B 4796):

sudo apt-key del D38B4796
remove GPG key in Ubuntu

Equally, you can too use all the public key. However this time, it’s important to embody areas between two strings, as proven:

sudo apt-key del "72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310"

Cautious with what you add and what you take away

Particularly when you’re a brand new Linux consumer, you’ll encounter many thrilling issues and repositories you’ll add and take away.

Whereas it’s good to experiment, it is best to all the time watch out about something you add/take away to your system. You need to hold some issues in thoughts, like: Does it embody up to date packages? Is it a trusted or maintained repository?

Being cautious will hold your system free from pointless repositories and packages.

I hope this information helps you take away the repository you don’t want!

Be happy to let me know when you face any points within the feedback beneath, and think about becoming a member of our It is FOSS Neighborhood discussion board to get quicker assist!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments