Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Remove unuse RPM during rollback with zypper

  1. #1

    Question Remove unuse RPM during rollback with zypper

    Hi Folks,


    I have an trouble when using zypper command to rollback software. I'm using SUSE Linux Enterprise Server 12 SP1 (x86_64).


    Let's say i have one RPM named main-1.0.0.x86_64.rpm,it has dependency as following:
    main-1.0.0.x86_64.rpm
    |_ foo-1.0.0.x86_64.rpm


    After some time of development, i add one more dependency to RPM main , and the RPM main version upgrade to main-1.1.0, now it has such an dependency:
    main-1.1.0.x86_64.rpm
    |_ foo-1.0.0.x86_64.rpm
    |_ bar-1.0.0.x86_64.rpm


    Assume that current my SUSE system installed main-1.1.0.x86_64.rpm, now i wnat to rollback main-1.1.0.x86_64.rpm to main-1.0.0.x86_64.rpm, with following command:




    Code:
    sudo zypper --no-gpg-checks -n in --force-resolution --oldpackage --replacefiles -r myrepo main-1.0.0
    The rollback compelete successfully, but problem is bar-1.0.0.x86_64.rpm still left on my SUSE system, my question is how can i do to make the unused RPM(bar-1.0.0.x86_64.rpm) removed during rollback without additional operation?


    Thanks.



  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,972

    Default Re: Remove unuse RPM during rollback with zypper

    I think this is a variant on the problem asked here several times: I installed package A, packge B and C were also installed as dependencies. Now I deinstalled A, but B and C are still there.

    Remember that B and C were installed because A asked for it. AND they were not installed at that moment in time. Maybe D is also a dependency of A (or B), but was already installed. Now what to do when A is deinstalled?
    All of them (specialy D) might still be wanted by other packages (which is something that zypper could detect and warn for), but zypper can not "know" if e.g. C is in the mean time is wanted on the system for other reasons (e.g. havinga program that is executed directly by users).

    IMHO, your case is even more tricky because nothing is deinstalled at all. It is an update and some packages are installed because they are of a newer version. There is no information whatsoever that the package that, according to you, is superfluous is not updated because there is no newer version (as there are hundreds of other packages on the system during that update) or because it does not exist any more. However, if you remove it from the repo, it will be seen as "orphaned" and show red in YaST listings.
    Henk van Velden

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,369
    Blog Entries
    3

    Default Re: Remove unuse RPM during rollback with zypper

    Quote Originally Posted by was22491686 View Post
    I'm using SUSE Linux Enterprise Server 12 SP1 (x86_64).
    In all honesty, you have posted in the wrong forums. Try forums.suse.com.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2 Beta

  4. #4

    Default Re: Remove unuse RPM during rollback with zypper

    Quote Originally Posted by hcvv View Post
    I think this is a variant on the problem asked here several times: I installed package A, packge B and C were also installed as dependencies. Now I deinstalled A, but B and C are still there.

    Remember that B and C were installed because A asked for it. AND they were not installed at that moment in time. Maybe D is also a dependency of A (or B), but was already installed. Now what to do when A is deinstalled?
    All of them (specialy D) might still be wanted by other packages (which is something that zypper could detect and warn for), but zypper can not "know" if e.g. C is in the mean time is wanted on the system for other reasons (e.g. havinga program that is executed directly by users).

    IMHO, your case is even more tricky because nothing is deinstalled at all. It is an update and some packages are installed because they are of a newer version. There is no information whatsoever that the package that, according to you, is superfluous is not updated because there is no newer version (as there are hundreds of other packages on the system during that update) or because it does not exist any more. However, if you remove it from the repo, it will be seen as "orphaned" and show red in YaST listings.
    Thanks for your reply.

    As I know there are a option can help user to clean up the dependencies when removing package: "zypper rm --clean-deps", but there is no such an option when using "zypper install", is there any similary parameter when using "zypper in --oldpackage" that can help me to delete these unuse dependencies?

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,369
    Blog Entries
    3

    Default Re: Remove unuse RPM during rollback with zypper

    You can always use:

    Yast --> Software Management

    Choose the "Package Group" view. And click on "unneeded packages". That's a list of all of the packages that you could safely remove. I'm not sure whether some whether those might come back if you don't block them.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2 Beta

  6. #6
    Join Date
    Apr 2014
    Location
    "Great North Wet"
    Posts
    151

    Default Re: Remove unuse RPM during rollback with zypper

    I know this is a year old, but when you say:
    Code:
    Yast --> Software Management
    
    Choose the "Package Group" view.  And click on "unneeded packages".
    Is that something specific to 15.1 because I can not find anything in Yast->Software Managment on TW called "Package Group" or "unneeded packages"
    There is "Patterns", but in Patterns there is no "unneeded... entry there.
    Turkey Creek Jack Johnson: Nobody move!
    Doc Holliday: Nonsense. By all means, move.

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,369
    Blog Entries
    3

    Default Re: Remove unuse RPM during rollback with zypper

    Quote Originally Posted by erbenton View Post
    Is that something specific to 15.1 because I can not find anything in Yast->Software Managment on TW called "Package Group" or "unneeded packages"
    There is "Patterns", but in Patterns there is no "unneeded... entry there.
    It has been part of Yast software management for as long as I can remember.

    Click on "View" near top left of the screen.
    Select "Package Groups".

    After that, you should have a separate tab for "Package Groups".
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2 Beta

  8. #8
    Join Date
    Sep 2012
    Posts
    5,393

    Default Re: Remove unuse RPM during rollback with zypper

    Quote Originally Posted by nrickert View Post
    Click on "View" near top left of the screen.
    Select "Package Groups".

    After that, you should have a separate tab for "Package Groups".
    It is not in separate tab, it is in the group list as one of package groups (near the end). Group list is not alphabetically sorted also.

  9. #9
    Join Date
    Sep 2012
    Posts
    5,393

    Default Re: Remove unuse RPM during rollback with zypper

    Quote Originally Posted by nrickert View Post
    It has been part of Yast software management for as long as I can remember.
    No more. It [Package Groups View] was removed from upstream YaST and change is finally in TW. In 20191112 there is no more Package Groups. So baby went with the water - no Package Groups, no way to display orphaned/unneeded packages.

  10. #10
    Join Date
    Sep 2012
    Posts
    5,393

    Default Re: Remove unuse RPM during rollback with zypper

    Quote Originally Posted by arvidjaar View Post
    no way to display orphaned/unneeded packages.
    It seems orphaned packages are now shown in Repositories - @System - "Unmaintained packages" as secondary filter. I could not find where it is possible to show what was earlier displayed as "unneeded packages".

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •