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

Thread: Zypper Equivalent for apt-get autoremove

  1. #1

    Default Zypper Equivalent for apt-get autoremove

    Debian has the following command: apt-get autoremove

    This is used to remove packages that were automatically installed to
    satisfy dependencies for some package and that are no more needed.

    Just curious to know if there is a zypper equivalent.

    Thanks.
    --
    tb

  2. #2
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Zypper Equivalent for apt-get autoremove

    the switch --clean-deps
    for example
    Code:
    zypper rm chromium --clean-deps
    removes chromium and the dependencies that wore installed.

    if you want to remove orphaned packages (packages that wore pulled by a now uninstalled app) try
    Code:
    zypper packages --orphaned
    that will command will print a list of orphaned packages that you can safely remove

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,378

    Default Re: Zypper Equivalent for apt-get autoremove

    Quote Originally Posted by tb75252 View Post
    Debian has the following command: apt-get autoremove

    This is used to remove packages that were automatically installed to
    satisfy dependencies for some package and that are no more needed.

    Just curious to know if there is a zypper equivalent.

    Thanks.
    --
    tb
    Hello,

    In far the majority of the cases, part of the question/problem description is what versions of what software is used. Particulary which version of openSUSE.

    Because many people seem to forget this, in the web interface of these forums we force our users by a menu to choose a version that then is displayed as a prefix to the thread title.

    You apparently use the NNTP interface where we can not enforce such a thing. So please try to remember this basic fact next time you start a thread and mention the openSUSE version your thread is relevant to.
    Henk van Velden

  4. #4

    Default Re: Zypper Equivalent for apt-get autoremove

    On 09/12/2016 08:36 AM, hcvv wrote:
    >
    > tb75252;2792153 Wrote:
    >> Debian has the following command: apt-get autoremove
    >>
    >> This is used to remove packages that were automatically installed to
    >> satisfy dependencies for some package and that are no more needed.
    >>
    >> Just curious to know if there is a zypper equivalent.
    >>
    >> Thanks.
    >> --
    >> tb

    > Hello,
    >
    > In far the majority of the cases, part of the question/problem
    > description is what versions of what software is used. Particulary which
    > version of openSUSE.
    >
    > Because many people seem to forget this, in the web interface of these
    > forums we force our users by a menu to choose a version that then is
    > displayed as a prefix to the thread title.
    >
    > You apparently use the NNTP interface where we can not enforce such a
    > thing. So please try to remember this basic fact next time you start a
    > thread and mention the openSUSE version your thread is relevant to.
    >
    >


    Sorry about that! I am using openSUSE Leap 42.1, 64-bit.
    --
    tb

  5. #5
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Zypper Equivalent for apt-get autoremove

    I haven't used ubuntu in a long time and then it was for a few days
    but isn't
    Code:
    zypper rm <package name> --clean-deps
    what you wanted?

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,875
    Blog Entries
    3

    Default Re: Zypper Equivalent for apt-get autoremove

    Quote Originally Posted by I_A View Post
    I haven't used ubuntu in a long time and then it was for a few days
    but isn't
    Code:
    zypper rm <package name> --clean-deps
    what you wanted?
    I think that should be:
    Code:
    zypper rm --clean-deps <package name>
    (options go first).

    But I think the OP wanted to remove left-overs without specifying a particular package.

    You can do that in Yast. Select the "Package Group" view, and then click on "Unneeded packages" for a list of them. Those should be safely removable, since they are unneeded.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #7
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Zypper Equivalent for apt-get autoremove

    Quote Originally Posted by nrickert View Post
    I think that should be:
    Code:
    zypper rm --clean-deps <package name>
    (options go first).

    But I think the OP wanted to remove left-overs without specifying a particular package.

    You can do that in Yast. Select the "Package Group" view, and then click on "Unneeded packages" for a list of them. Those should be safely removable, since they are unneeded.
    I think that's a bug from the manual
    http://doc.opensuse.org/documentatio...zypper.softman
    If (together with a certain package) you automatically want to remove any packages that become unneeded after removing the specified package, use the --clean-deps option:

    Code:
    zypper rm package_name --clean-deps

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,378

    Default Re: Zypper Equivalent for apt-get autoremove

    Quote Originally Posted by nrickert View Post

    You can do that in Yast. Select the "Package Group" view, and then click on "Unneeded packages" for a list of them. Those should be safely removable, since they are unneeded.
    I am always confused with such an option. What is "unneeded"? What is the technical definition of "unneeded" in this case? I can imagine that it is a package that is not a dependancy of any other package. But that would mean that a package at the top of the dependancy list like Amarok is "unneeded", because it is not needed by another package. That it IS needed by the user is not something the system can know (as long as it is not a mind reading system).

    And as long as I do not understand what it realy means, I am reluctant to use any action based on it.

    Somewhere above orphaned packages are mentioned. Again a definition of what that is is needed to understand what doing actions on them will bring about. IMHO orphaned packages are packages that are not in any repos the system is subsribed to. Thus they can either be from direct RPM installations (not from a repo), or from repos that are disabled/removed. They are shown red in the YaST listings. Can any body confirm this or give the correct definition.
    Henk van Velden

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,875
    Blog Entries
    3

    Default Re: Zypper Equivalent for apt-get autoremove

    Quote Originally Posted by hcvv View Post
    I am always confused with such an option. What is "unneeded"? What is the technical definition of "unneeded" in this case? I can imagine that it is a package that is not a dependancy of any other package.
    I'm not sure, either. But I'm guessing that it is a package that is neither a dependency nor a recommend. And maybe it can't be a pattern either.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  10. #10

    Default Re: Zypper Equivalent for apt-get autoremove

    Quote Originally Posted by I_A View Post
    the switch --clean-deps
    for example
    Code:
    zypper rm chromium --clean-deps
    removes chromium and the dependencies that wore installed.

    if you want to remove orphaned packages (packages that wore pulled by a now uninstalled app) try
    Code:
    zypper packages --orphaned
    that will command will print a list of orphaned packages that you can safely remove
    Actually this is not correct. --orphaned means packages that do not come from a repo. For instance I
    install the Atom IDE directly from a RPM, so it shows up as orphaned.

    What I believe you are looking for is:

    Code:
    zypper packages --unneeded

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
  •