|
Bugzilla – Full Text Bug Listing |
| Summary: | SLES 15 upgrade documentation instructs to use a concerning command post-upgrade that can remove system critical packages | ||
|---|---|---|---|
| Product: | [Non-product-specific documentation] Documentation | Reporter: | Blake Rutledge <blake.rutledge> |
| Component: | SLE Family | Assignee: | Christoph Wickert <cwickert> |
| Status: | RESOLVED FIXED | QA Contact: | Tanja Roth <taroth> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | cameron.cumberland, samuel.snow |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | SLES 15 | ||
| Whiteboard: | https://jira.suse.com/browse/DOCTEAM-1060 | ||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | output of zypper packages --orphaned --unneeded | ||
|
Description
Blake Rutledge
2023-06-28 20:09:01 UTC
I will add that there are more precise ways to employ this command
To excludea single package or pattern from being uninstalled
sudo zypper rm $(zypper --no-refresh packages --orphaned --unneeded | gawk '{print $5}' | tail -n +5 | grep -v <package to exclude>)
To exclude multiple packages defined in a text file, separated by a newline
sudo zypper rm $(zypper --no-refresh packages --orphaned --unneeded | gawk '{print $5}' | tail -n +5 | grep -v -f packages_to_keep.txt)
<Credit to engineer Samuel Snow for these>
Thank you for filing this bug report, Blake! It is being tracked and processed as part of our queue. I have reassigned it our maintainer of the Upgrade Guide, he will take a look after he is back from vacation. (In reply to Blake Rutledge from comment #0) > I assume zypper flags packages as unneeded as the > result of a dependency the package was relying on previously no longer being > installed. I'm asking for clarification on how zypper's logic works for > unneeded. zyppers logic basically is 1. Packages are either installed explicitly by the user or implicitly as dependency. 2. explicitly: installed by the user or as part of a pattern or product. 3. implicitly: dependency (required, recommended, or suggested) of an explicitly installed package. To keep track of of the installed dependencies, zypper writes /var/lib/zypp/AutoInstalled. Problems occur when 1. This file is removed: everything is considered installed implicitly (?) 2. Patterns change: A package was part of a pattern in one release but is no longer in the next. The package will no longer be considered installed implicitly and might get removed when cleaning up without care. For further details, refer to https://github.com/openSUSE/libsolv/blob/master/src/cleandeps.c Fixed in main: https://github.com/SUSE/doc-sle/commit/2834485a maintenance/SLE15SP5: https://github.com/SUSE/doc-sle/commit/5cf0b58c maintenance/SLE15SP4: https://github.com/SUSE/doc-sle/commit/dde24d4c Will go live next Thursday. Feedback welcome in the meantime! |