how to reset my repository list - tumbleweed

Hi there !

I messed up so badly my repository list that I new to install a fresh one.
How can I do that ? Running Tumbleweed.
There is a package to force install or a list of “official” download sites to be in repository list ?

thanks in advance !

You better post it here and then we can advice what to do.

zypper lr -d

You can manage your repository list with YaST2 Repositories or in a terminal with the zypper command.
Basic repositories are referenced here
To add a new repository follow the directions here
To remove repositories with zypper open a terminal, login as superuser and list the current repos typing:

bruno@LT_B:~> su -
LT_B:~ # zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                     | Name                                    | Enabled | GPG Check | Refresh
 1 |     | Packman Repository                      | Yes     | (r ) Yes  | Yes
 2 | repo-debug                | openSUSE-Leap-15.0-Debug                | No      | ----      | ----
 3 | repo-debug-non-oss        | openSUSE-Leap-15.0-Debug-Non-Oss        | No      | ----      | ----
 4 | repo-debug-update         | openSUSE-Leap-15.0-Update-Debug         | No      | ----      | ----
 5 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No      | ----      | ----
 6 | repo-non-oss              | openSUSE-Leap-15.1-Non-Oss              | Yes     | (r ) Yes  | Yes
 7 | repo-oss                  | openSUSE-Leap-15.1-Oss                  | Yes     | (r ) Yes  | Yes
 8 | repo-source               | openSUSE-Leap-15.0-Source               | No      | ----      | ----
 9 | repo-source-non-oss       | openSUSE-Leap-15.0-Source-Non-Oss       | No      | ----      | ----
10 | repo-update               | openSUSE-Leap-15.1-Update               | Yes     | (r ) Yes  | Yes
11 | repo-update-non-oss       | openSUSE-Leap-15.1-Update-Non-Oss       | Yes     | (r ) Yes  | Yes
LT_B:~ #

Then you are able to remove a “messed up” repo, say #8 in my example, by typing:

LT_B:~ # zypper removerepo 8

Please be aware that after one repo has been removed the number of all repos that follow is updated so pay attention to the current number of the repo you are going to remove.
If you really really want to remove all repos instead of only the messed up ones, you may try the -all option as in:

LT_B:~ # zypper removerepo -all

1 Like

I agree with most what you say, but your repo list does not have the URIs and thus in fact does not provide the information needed. Now the names and aliases you have there may point to what the URIs are, but we can not be sure. And as the OP explains that he made a mess of it, we may also assume that names and/or aliases there do not provide hints to what the repos are.

Then, as an addition to the warning of changing repo number when adding/removing repos, it might be better to advice using the Alias. They are ther as short, but meaning full (that is what they should be) references and, most important, they do not change. The equivalent of the example:

zypper removerepo repo-oss

Yeah, you right. “zypper lr -pu” could provide the missing repo’s URL.
But it is ok, as @OrsoBruno provided a link to the official repositories. Thanks OrsoBruno !

And I wish I’ve read your post before I removed some repos, as I was a victim of the pitfall you mentioned about using repos numbers. I wanted to remove the repo 4 and 5 and so, issued the numbers 4 and 5, resulting in removing the repos 4 and 6 (since after the first remove repo command, 5 becomes 4 and 6 becomes 5). Not a big deal also, as I saved the original list and I could manage to figure out what was the repo 6.

Anyway, it’s all set now. Thanks all of you !

You are welcome.

When you have some spare time:

man zypper

A minimal list of ‘official’ repos is:

12 | packman             | Packman repository (openSUSE_Tumbleweed)            | Yes     | (r ) Yes  | Yes     |   90     | 
10 | openSUSE-20191106-0 | openSUSE-Tumbleweed-Oss                             | Yes     | (r ) Yes  | Yes     |   99     | 
15 | repo-non-oss        | openSUSE-Tumbleweed-Non-Oss                         | Yes     | (r ) Yes  | Yes     |   99     | 
17 | repo-update         | openSUSE-Tumbleweed-Update                          | Yes     | (r ) Yes  | Yes     |   99     |

See also:

Since when is Packman official?

And isn’t there an Update repo for non-OSS in Tumbleweed? In Leap there is. And I would call that one “official”.

Packman enhances packages available in ‘official’

And isn’t there an Update repo for non-OSS in Tumbleweed?
There is but it was skipped by the installer on 2019-11-06.

Note that zypper commands can apply to any repo entry by referencing something unique.
So, for the above example, instead of

LT_B:~ # zypper removerepo 8

You can reference for example the alias

LT_B:~ # zypper removerepo repo-source

or the actual repo name

LT_B:~ # zypper removerepo openSUSE-Leap-15.0-Source

All three of the above will remove the same repo, and the last two will remove only that repo even if the repo ordinal changes

Note how useful this can be…
So for example if there is a Forum thread that requires an operation on the Packman repo, then you can provide a command assuming the default Packman repo name (which would probably work over 99% of the time because no one has reason to change) and the command should work no matter what other repos are configured for that User.


The problem is in the assumption. I am not sure that that is always the case. I am even not sure that adding the Packman repo (or any other one) will always use the same name/alias. People have e.g. added Packman over time using different ways, like using Community Repos from YaST, using a published zypper command in one of our threads and all can have used different aliases over time (Packman, packman, I have even seen complete URLs as alias). This is why we often first ask a list from an OP so we know what is used in his case and then tell him what to do. Better safe then sorry.