Best way to revert full repository vendor change?

Hi,

Well you can probably disable or remove the OBS repo, You can cherry pick the packages using

yast2 sw_single

once you have disabled the OBS repo where those packages came from and do a force re-install those packages without the OBS repo.

Scripting zypper might do it also.

First find out the OBS repo.

zypper lr
#  | Alias                     | Name                               | Enabled | Refresh
---+---------------------------+------------------------------------+---------+--------
 1 | Packman                   | Packman                            | Yes     | No     
 2 | libdvdcss                 | libdvdcss                          | Yes     | No     
 3 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No     
 4 | repo-debug                | openSUSE-13.2-Debug                | No      | No     
 5 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | No     
 6 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | No     
 7 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | No     
 8 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | No     
 9 | repo-source               | openSUSE-13.2-Source               | No      | No     
10 | repo-update               | openSUSE-13.2-Update               | Yes     | No     
11 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | No   
**12** | shells                    | shells                             | Yes     | No                                      

The leading number in the repos would suffice in our example.

In this example we will do a vendor change from OBS shell repo to standard openSUSE repo.

List the packages from the shell repo (leading number 12)

zypper --no-refresh se -ir 12 | awk '$1 ~ /^i/{print $3}'

bash
bash-completion
bash-doc
bash-lang
command-not-found
ksh
libreadline6
readline-doc
scout
zsh

Now capture/save that packages in an (bash) array named packages in our example.

mapfile -t packages < <(zypper --no-refresh se -ir 12 | awk '$1 ~ /^i/{print $3}')

Disable that shell repo (leading number 12).

zypper mr -d 12

Do a force reinstall of the packages that came from the OBS shell repo (leading number 12) to the standard openSUSE repo.

zypper in -f "${packages@]}"

This is just a simple case but you might have some more complicated cases that cherry picking packages one-by-one is needed and doing it manually.
Also some folks might have some better ideas. :wink: