If package is installed from a repo, that is eventually removed completely from the repo, what occurs to the package installed on the system? Does it remain as is, or would zypper dup attempt to remove it? I have a package installed from an external repo and it was removed from the repo due to an issue, but not before I upgraded it and zypper dup now wants to downgrade it (which would corrupt the user profile associated with it).
Easy check:
Install a package from a 3rd party repo:
test:~ # zypper in google-chrome-stable
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
google-chrome-stable
1 new package to install.
Package download size: 109.2 MiB
Package install size change:
| 348.4 MiB required by packages that will be installed
348.4 MiB | - 0 B released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):
Retrieving: google-chrome-stable-131.0.6778.108-1.x86_64 (Chrome) (1/1), 109.2 MiB
Retrieving: google-chrome-stable-131.0.6778.108-1.x86_64.rpm ..............................................................................................................................................................................................[done (6.4 MiB/s)]
Checking for file conflicts: ..........................................................................................................................................................................................................................................[done]
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
(1/1) Installing: google-chrome-stable-131.0.6778.108-1.x86_64 ........................................................................................................................................................................................................[done]
Running post-transaction scripts ......................................................................................................................................................................................................................................[done]
test:~ #
Remove the 3rd party repo:
test:~ # zypper rr Chrome
Removing repository 'Chrome' ..........................................................................................................................................................................................................................................[done]
Repository 'Chrome' has been removed.
test:~ #
Zypper dup:
test:~ # zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...
Nothing to do.
test:~ #
Installed package:
test:~ # zypper se -si google-chrome-stable
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+----------------------+---------+------------------+--------+------------------
i+ | google-chrome-stable | package | 131.0.6778.108-1 | x86_64 | (System Packages)
test:~ #
As you can easily see, nothing will happen.
But if the package is available in another enabled repo, zypper will update/downgrade it to the available version.
This was an example what would happen with an installed package when it dissappears from the mirror (in this case it was simulated by removing the repo).
It may chose to silently remove it if removal solves dependency problems. Otherwise zypper would ask you presenting it as possible choice. zypper will not remove this package just because it became orphaned.
I am not sure what you are trying to achieve with that. Packages that cannot be associated with any enabled repository are by definition orphaned packages. It does not matter whether you remove or disable repository.