Results 1 to 10 of 10

Thread: How to find the unused packages?

  1. #1
    ram88 NNTP User

    Default How to find the unused packages?


    How to find the packages what's are installed as dependencies while I'm
    installed an other program.
    Example: I'm installed a java game and the package manager installed
    about 6-7 more programs for dependencies. I don't like this game, so I'm
    uninstalled it - but how to remove the other packages what's are also
    installed just for this game and doesn't needed by any other
    application?
    Thanks.


    --
    http://yami.googlecode.com/
    http://akoskm.blogspot.com/
    ------------------------------------------------------------------------
    ram88's Profile: http://forums.opensuse.org/member.php?userid=1058
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  2. #2
    deano ferrari NNTP User

    Default Re: How to find the unused packages?


    This is not always a strait forward process.

    You can do

    rpm -qa --last

    which will list all packages installed by date. From that info you can
    probably determine which additional packages were added along with a
    particular application you installed.

    You can also crosscheck with

    rpm -qR name_of_application_package

    to see which dependencies 'name_of_application_package' has.


    --
    deano_ferrari
    ------------------------------------------------------------------------
    deano_ferrari's Profile: http://forums.opensuse.org/member.php?userid=122
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  3. #3
    ram88 NNTP User

    Default Re: How to find the unused packages?


    Okay. Thanks for the suggestion!
    So, just to clear out - there is no option to determinate what is
    "junk"(unused) from your packages.


    --
    http://yami.googlecode.com/
    http://akoskm.blogspot.com/
    ------------------------------------------------------------------------
    ram88's Profile: http://forums.opensuse.org/member.php?userid=1058
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  4. #4
    deano ferrari NNTP User

    Default Re: How to find the unused packages?


    Not really. Care needs to be exercised when installing additional
    (potentially useless) application packages so as to avoid package bloat.



    --
    deano_ferrari
    ------------------------------------------------------------------------
    deano_ferrari's Profile: http://forums.opensuse.org/member.php?userid=122
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  5. #5
    Chris Maaskant NNTP User

    Default Re: How to find the unused packages?

    Op Sun, 18 Jan 2009 10:16:01 +0000, schreef ram88:

    > Okay. Thanks for the suggestion!
    > So, just to clear out - there is no option to determinate what is
    > "junk"(unused) from your packages.


    I believe this is something worked for the next version for zypper.
    Not sure though, maybe it was just a request.

    --
    Chris Maaskant

  6. #6
    hcvv NNTP User

    Default Re: How to find the unused packages?


    ram88;1929390 Wrote:
    > Okay. Thanks for the suggestion!
    > So, just to clear out - there is no option to determinate what is
    > "junk"(unused) from your packages.

    You should have written them down.


    --
    Henk van Velden
    ------------------------------------------------------------------------
    hcvv's Profile: http://forums.opensuse.org/member.php?userid=180
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  7. #7
    6205 NNTP User

    Default Re: How to find the unused packages?


    Uhmm....if you think at sudo apt-get autoremove from Ubuntu, you're out
    of luck. Zypper doesn't have similar feature


    --
    6205
    ------------------------------------------------------------------------
    6205's Profile: http://forums.opensuse.org/member.php?userid=2283
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  8. #8
    robopensuse NNTP User

    Default Re: How to find the unused packages?


    The dependencies of a package are shown by the Software Package Manager,
    but unfortunately there's not a simple GUI way of discovering which
    packages satisfied the dependencies.

    Example, looking at Wesnoth :

    libc
    libz
    ...
    libSDL
    wesnoth-data-set
    wesnoth-data-base
    wesnoth-data-full


    Unfortunately it won't let my copy text and paste it.
    rpm will tell you the package name that a file belongs in :

    rob@fir:~> rpm -qf /usr/lib/libXft.so
    xorg-x11-devel-7.2-103.4
    rob@fir:~> rpm -qf /usr/lib/libXft.so.2
    xorg-x11-libs-7.2-103.4

    The ordering appears to be a big clue, without knowing what package
    bloated the system, it's hard to know which dependencies are culprits.

    There's probably a way of scripting, to find packages which aren't
    required :

    rob@fir:~> rpm -q --whatprovides libXft.so.2
    xorg-x11-libs-7.2-103.4
    rob@fir:~> rpm -q --whatrequires libXft.so.2
    v4l-conf-3.95-98
    yast2-control-center-qt-2.15.4-12
    sax2-tools-8.1-258
    pango-1.18.2-4
    kpowersave-0.7.3-5
    compiz-kde-0.5.4-27
    vte-0.16.9-4
    grip-3.2.0-171
    fvwm2-2.5.23-1.1
    xorg-x11-7.2-135.4
    kmplayer-0.10.0c-0.pm.2
    avahi-qt3-0.6.20-40
    kde4-amarok-4.0.svn765209-1.7
    koffice-1.6.3-81.1
    koffice-illustration-1.6.3-81.1
    dbus-1-qt3-0.62-110.1
    kvirc-3.2.6-85
    libkde4-4.0.4-33.18
    libkdegames4-4.0.4-11.49
    libkonq4-4.0.4-22.42
    kdelibs4-doc-4.0.4-33.18
    qt3-3.3.8b-88.2
    arts-1.5.10-14.3
    kdelibs3-3.5.10-31.1
    kdegraphics3-pdf-3.5.10-2.25
    kdebase3-runtime-3.5.10-29.1
    kdenetwork3-InstantMessenger-3.5.10-15.2
    libkcompactdisc4-4.0.4-11.71
    libakonadi4-4.1.0-2.1
    libkdepimlibs4-4.1.0-2.1
    openbox-3.4.7.2-2.3
    lxterminal-0.1.3-6.1
    ktorrent-2.2.7-0.pm.3
    mozilla-xulrunner190-1.9.0.5-3.1
    xterm-229-17.2

    So looking at the dependencies of the package, rpm -q --whatrequires
    <dependency> not finding a dependant package, suggests you can remove it
    safely. rpm -q --requires <package> should give you a list of
    dependencies to check with --whatrequires.


    --
    robopensuse
    ------------------------------------------------------------------------
    robopensuse's Profile: http://forums.opensuse.org/member.php?userid=17292
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  9. #9
    RedDwarf NNTP User

    Default Re: How to find the unused packages?


    robopensuse;1929436 Wrote:
    > There's probably a way of scripting, to find packages which aren't
    > required



    Code:
    --------------------
    #!/bin/bash

    export LC_ALL=C

    for PACKAGE in $(rpm -qa); do
    NEEDED=false
    for PROVIDE in $(rpm -q --provides "$PACKAGE" | awk '{print $1}'); do
    if [ $(rpm -q --whatrequires "$PROVIDE" | fgrep -v 'no package requires' | wc -l) -gt 0 ]; then
    NEEDED=true
    fi
    done
    if [ "$NEEDED" = false ]; then
    echo "$PACKAGE"
    fi
    done
    --------------------


    Execute it and the output will make clear why isn't so simple.
    First, there are not just hard dependencies ("requires"), there are
    also soft deps ("recommends", "suggests", "supplements" and "enhances").
    But even if you also look at them... no package requires
    "kdebluetooth4", does that means that I can remove it? NOOOO!! There are
    packages that are installed just because the user wants them, not
    because other packages need them. Start to remove every package that
    isn't needed by another one recurrently and you will end removing *all*
    the packages.

    To implement the "unneeded packages" feature one needs to know why a
    package was installed. But even this way can fail: suppose there exists
    a package 'X' that needs kdebluetooth4. You install X and so
    kdebluetooth4 is automatically installed. You want kdebluetooth4 by
    itself, but since has been automatically installed when you remove 'X'
    kdebluetooth4 will be also removed.

    What apt-get/aptitude/etc. do is mark every package like automatically
    or manually installed. That's the same that openSUSE will do... but,
    again, even if it's better than the script it's still far from perfect.


    --
    RedDwarf
    ------------------------------------------------------------------------
    RedDwarf's Profile: http://forums.opensuse.org/member.php?userid=374
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


  10. #10
    ram88 NNTP User

    Default Re: How to find the unused packages?


    Thanks for everyone! Good reason to start experimenting with package
    management.


    --
    http://yami.googlecode.com/
    http://akoskm.blogspot.com/
    ------------------------------------------------------------------------
    ram88's Profile: http://forums.opensuse.org/member.php?userid=1058
    View this thread: http://forums.opensuse.org/showthread.php?t=405306


Posting Permissions

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