Results 1 to 6 of 6

Thread: Removing unneeded dependencies

  1. #1

    Question Removing unneeded dependencies

    Hello all, I'm using OpenSUSE 13.1. When I install a package, some other packages (dependencies) are installed together. BUT I noticed that if I remove this same package, sometimes a few packages are removed, that is, some unneeded dependencies are left behind. An hypothetical example to make it clearer: if I install a package X using zypper, it says I'll have to install 10 packages in order to perform this action. I accept and it installs 10 packages. But then I ask zypper to remove package X, it says I'll have to uninstall 8 (or less) packages. This makes me conclude that I might have unneeded dependencies wasting resources in my system. How do I identify these unneeded packages to get rid of them?


    TL;DR: I need a zypper command equivalent to apt-get autoremove

  2. #2

    Default AW: Removing unneeded dependencies

    Quote Originally Posted by renatov View Post
    TL;DR: I need a zypper command equivalent to apt-get autoremove
    See "zypper help rm":
    Code:
    -u, --clean-deps            Automatically remove unneeded dependencies.
    You can set this option in /etc/zypp/zypp.conf as well:
    Code:
    #### EXPERTS ONLY: Cleanup when deleting packages. Whether the solver should
    ## per default try to remove packages exclusively required by the ones he's
    ## asked to delete.
    ##
    ## This option should be used on a case by case basis, enabled via
    ## command line options or switches the applications offer. Changing
    ## the global default on a system where unattended actions are performed,
    ## may easily damage your system.
    ##
    ## CHANGING THE DEFAULT IS NOT RECOMMENDED.
    ##
    ## Valid values:  boolean
    ## Default value: false
    ##
    # solver.cleandepsOnRemove = false
    Or enable the option "Cleanup when deleting packages" in YaST.


  3. #3

    Default Re: Removing unneeded dependencies

    Hi wolfi323, thanks for your reply. By using -u argument, I must specify a target package, right? But what about all previous packages I already removed? How do I find my current unneeded dependencies to get rid of them, without specifying a target (since there might be a lot of targets, and I can't list them all)?

  4. #4

    Default Re: Removing unneeded dependencies

    Quote Originally Posted by renatov View Post
    Hi wolfi323, thanks for your reply. By using -u argument, I must specify a target package, right?
    Correct.

    But what about all previous packages I already removed? How do I find my current unneeded dependencies to get rid of them, without specifying a target (since there might be a lot of targets, and I can't list them all)?
    I don't think there's an easy way yet to do that with zypper.
    But there are some filter options in YaST->Software Management->View Package Groups:
    Recommended packages, suggested packages, orphaned packages (not available in any repo), unneeded packages (not required by any other packages).
    Hint: to uninstall all packages in the list, just right-click on the package list and select "All in this list"->"Uninstall".

    Or you could use "rpmorphan":
    http://rpmorphan.sourceforge.net/
    A package is included in openSUSE, you just have to install it with YaST or zypper.

  5. #5

    Default Re: Removing unneeded dependencies

    I'm afraid my YaST -> Software Manager is slightly different than yours and it doesn't seem to have the "orphan" group:



    I'll check rpmorphan later to see if it can get rid of my uneeded dependencies.

  6. #6

    Default Re: Removing unneeded dependencies

    Quote Originally Posted by renatov View Post
    I'm afraid my YaST -> Software Manager is slightly different than yours and it doesn't seem to have the "orphan" group:
    You seem to be using the Gtk version.
    That one is apparently missing that filter unfortunately.

    I'll check rpmorphan later to see if it can get rid of my uneeded dependencies.
    It should.
    And it has many more options. F.e. it can even uninstall applications that you didn't start since a certain amount of time AFAIK.

Tags for this Thread

Posting Permissions

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