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 ?
You can manage your repository list with YaST2 Repositories or in a terminal with the zypper command.
Basic repositories are referenced here https://en.opensuse.org/Package_repositories
To add a new repository follow the directions here https://en.opensuse.org/SDB:Add_package_repositories
To remove repositories with zypper open a terminal, login as superuser and list the current repos typing:
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:
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:
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.
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.