How to prevent removed packages to be reinstalled by dist-upgrade?

I have made quite some changes to a fresh openSUSE LEAP 15 installation because I’m not really satisfied with the default application selection, like replacing GIMP with Krita and Firefox with Chromium, removing KGpg (because it’s unnecessary with Kleopatra being installed as well), Games and some other stuff that I never use.

The problem is now, that trying a

zypper dup

shows that a dist-upgrade wants to reinstall all the removed packages.

What’s the proper procedure to prevent that from happening?

Lock the packages that you do not want reinstalled.

Possibly

zypper dup --no-recommends

would already do what you want. But you would have to remember that every time.

To lock a package, you can use

zypper al packagename

or you might find it easier to use Yast software manager, search for the package, right click on that package and set it to never modify.

Why run a dist-upgrade on a freshly installed system? An attempt will reinstall all patterns packages, which are merely placeholders for dependencies / recommends. Locking packages will definitely bring a lot of dep errors if these packages are required by the patterns packages.
To update Leap 15, use


zypper up

instead of


zypper dup

zypper dup is used in TW because all upgrades are full OS upgrades. Use zypper up in Leap. Also since you don’t want some recommended package black list those in Yast or zypper as mentioned above

I know that I need to update LEAP with zypper up instead of zypper dup, I just had a look what it will be doing in case of distribution upgrade, like for the upcoming LEAP 15.1 (?).

Blocking all the unwanted removed packages will indeed bring a lot of dependency errors due to the patterns packages, so that is also no clean solution.

Remove certain patter packages?

Is there a way to locate the pattern package responsible for certain packages?

Any yes, it’s the same problem with Tumbleweed as well, just a lot more frequent. Or is it meant to just don’t care about any unwanted packages, and leave them in place as they are (and since they come back with every upgrade otherwise anyway)?

The latter is what I do. I don’t care about packages being installed that I don’t use. I’d rather keep the carefully built integrity of the system. But, the thing one can do, is to remove the concerned pattern packages. Where in case of upgrading to the next version one would have to be aware of packageX being replaced by packageY and deal with that manually.

This is when the menu gets crowded quickly. **********, I wish there was a “Minimal Install” option like they have on Kubuntu or a default minimal package selection like with KDE Neon.

During install you can edit the software selection ( at the summary stage ). You’re free to uncheck ( hence not install ) any patterns. This may leave you with an incomplete KDE but that would be your choice.

Re. the menu: I’ve never bothered, I start typing something like “music” and the menu will show me any program that has the word “music” in it’s desription. Much faster than clicking around. FWIW it shows Spotify, Amarok and whatever other entry. If I need Konsole, I start ‘kon’ and am left with Kontact, Konsole, Konversation … .

That’s exactly what I did, unselected some apps, unselected the games / kde_games patterns at the summary screen during installation, but when testing with ***zypper dup ***it wants to reinstall it all again, which is not the desired behavior for a distribution upgrade (though I know that other distributions are suffering the same problem).

Yes, less of a problem if simply using the menu to enter a keyword, but it still clutters up the system if having packages installed with similar purpose (like Calligra and LibreOffice) then.

As I haven’t come to that point yet, where do I set the default application to be used with more than one package being suitable for the job (like LibreOffice Writer or Calligra Words for ODT files)?

I am not sure, but IMHO testing zypper dup on a system where there is no new distribution available, will only confront you with the side effects of the functionality. One I know of is ignoring vendor stickiness, but there may be more. I doubt this way of testing zypper dup is anything useful. For testing zypper dup, you need a new distribution, that is, change the repos so that they point to the URLs of the new version and then do the zypper dup. Anything else will result in behaviour that will not tell you much about what will happen in the real case.

I find that testing zypper dup on a system without new new distribution being available quite useful, because it shows how it will behave in case of a real distribution upgrade.

If everything is up-to-date (so zypper up run previously), zypper dup ideally should show nothing to upgrade, but in my case it simply wants to reinstall all the packages and patterns that I have unselected during installation and removed afterwards, which of course is due to certain patterns that include these apps and patterns, but that’s not the behavior I desire as it makes any modifications to the package selection during installation and afterwards obsolete when a distribution upgrade is to be done.

I’m not sure what to do, I just prefer to to be able to make my own package selection, that does not get messed up with the next upgrade. I also thought that any changes I make during installation would stick, so for example if I deselect the games pattern, that the pattern that includes the game pattern gets deselected as well (without deselecting anything else that has already been selected by that pattern). Otherwise, what’s the point in offering a package selection during installation, if it all reverts to the default selection by the distribution during an upgrade? Bug or feature?

Well, it seems we disagree on the usefulness of the test.

In any case, I am not willing to accept your conclusions without a real test with a real new distribution.

… and you base this impression on what information?

Perhaps this statement is a non-sequitur.

I have not seen such a thing since tabooing numerous items I do not want.

Well, there is. Just read the information more carefully next time you install.:wink:

Too long since I did Kubuntu, and I’ve yet to try Neon, so I don’t know what “like” either of them means.

I nearly always do a minimal installation of openSUSE:

User Interface -> Custom -> Detailed Package Selection -> Dependencies -> <deselect> Install Recommended Packages

That way virtually nothing is preselected, so I get a minimal installation according to what I select. Without “install recommended packages”, which equates to “solver.onlyRequires = true” in /etc/zypp/zypp.conf, I never get surprised by unwanted packages being installed that are not hard dependencies of wanted packages.

A zypper dup might behave like a new install,
Awhile back (haven’t tested recently) I found it made little sense to remove packages during a new install… At least if you wanted to save space or time installing unwanted packages.

I found that during the install, the entire default image was install complete with unwanted packages, and then proceed to uninstall what was not wanted.

So,
Maybe you should approach any future upgrade the same way…
Maintain a script that uninstalls what you don’t want (don’t just uninstall and be done with it). and maybe even take it a step further and script how you customize your apps… Or at least create notes you can reference.

HTH,
TSU

What I do is mark the package as “Never Install” or “Protected” from the YaST software manager. Just right-click the package in its list, then choose “Taboo – Never Install” to prevent ‘zypper dup’ from installing it or “Protected – Do Not Modify” to prevent if from updating the package to another version.