Debian Planet










Welcome to Debian Planet

Search

Apt-get into it.
Main Menu

  • Home

  • Topics

  • Web Links

  • Your Account

  • Submit News

  • Stats

  • Top 10

  • Debian

    These are important Debian sites one should not be without!

  • Official Debian site

  • Package search

  • Mailing list archives

  • Bug reports

  • Debian on CD

  • Unofficial woody CD ISOs

  • Unofficial APT sources

  • Developers' Corner

    Other great Debian news sources:

  • Debian Weekly News

  • Kernel Cousin Debian

    (Debian mailing lists digested)
  • Community Groups

    Need help? You're not alone on this planet.

  • debianHELP

    (User support site)

  • Debian International

  • DebianForum.de

    (Deutsch)

  • EsDebian

    (español)

  • DebianWorld

    (français)

  • MaximumDebian

    (Italiano)

  • DebianUsers

    (Korean)

  • Debian-BR

    (Português)

  • IRC

    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.debian.org.

    Many of the Debian Planet staff live there so pop by and say hello.

    Wanna write?

    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you've written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    Sponsorship

    DP is sponsored by Xinit Systems and kieser.net.

    Domains paid for and hosted by uklinux.net.

    Buy your Debian merchandise at DebianShop.com.

    Who's Online

    There are currently, 59 guest(s) and 5 member(s) that are online.

    You are Anonymous user. You can register for free by clicking here.

      
    Unused Packages
    Contributed by Anonymous on Tuesday, January 08 @ 00:47:13 GMT

    Package Management
    I have quite a lot of Debian packages installed, and the count keeps increasing. I'd like to be able to delete the packages that have been unused for, say, several months. Is there a way to detect which packages haven't been used for quite a long time?

     
    Related Links

  • Comparison by Joey Hess
  • More about Package Management
  • News by DanielS

    Most read story about Package Management:
    What are the *real* .deb and .rpm differences

    Last news about Package Management:

    Printer Friendly Page  Send this Story to a Friend
  • "Unused Packages" | Login/Create Account | 20 comments
    Threshold


    The comments are owned by the poster. We aren't responsible for their content.

    Re: Unused Packages (Score: 0)
    by Anonymous on Tuesday, January 08 @ 02:33:25 GMT

    deborphan ?

    [ Reply ]


    Re: Unused Packages (Score: 0)
    by Anonymous on Tuesday, January 08 @ 04:30:36 GMT

    deborphan just checks for libraries that aren't used by any installed packages

    [ Reply ]


    Re: Unused Packages (Score: 0)
    by Anonymous on Tuesday, January 08 @ 09:53:31 GMT


    deborphan finds packages that have no packages depending

    on them. The default operation is to search only within

    the libs and oldlibs sections, to hunt down unused

    libraries.

    if you use the -a or --all-packages flags, it should do what you want.

    [ Reply ]


    Re: Unused Packages (Score: 1)
    by cockroach on Tuesday, January 08 @ 11:19:25 GMT
    (User Info)

    cool! i've been looking for exactly that tool for quite some time. but nobody in #debian could/wanted to help me. thanks!

    [ Reply ]


    Re: Unused Packages (Score: 1)
    by damiam on Tuesday, January 08 @ 02:57:23 GMT
    (User Info)

    Probably not. apt doesn't keep track of which programs you run when and how often. The only way I can think of is to go through deity, aptitude, or dselect and manually remove all the packages you don't use (assuming, of course) that nothing depends on them).

    [ Reply ]


    Re: Unused Packages (Score: 0)
    by Anonymous on Tuesday, January 08 @ 04:09:03 GMT

    I remember when I instaled FreeBSD 3.4 that when I accidently askedfor it to install a program that depended on GNOME I uninstalled it and it also uninstalled GNOME.

    What about something like this for Debian. it would help at least with piles of libraryies building up.

    Say instead of just purge, uninstall, install, and installed (or whatever they are), also a Depend. So when you ay to install GNOME-Games, it will load all of its dependencies in Depend mode. Then if you uninstall GNOME-games then it will also find all its dependencies that are of depend mode and uninstall them to. Then if you want to keep around something like GNOME, you explicity install it like we do now.

    [ Reply ]


    Re: Unused Packages (Score: 1)
    by undefined (undefined(at)engineer.com) on Tuesday, January 08 @ 06:29:46 GMT
    (User Info)

    you mean "deborphan"?

    http://packages.debian.org/testing/admin/deborphan.html

    i've got it installed but have never taken the time to configure it. (i found it while browsing my apt-cache with kpackage, thought it was something i might one day use, and decided to install it.) i believe you tell it what packages you explicitly want installed, and if a package isn't explicitly stated by you or a dependency of an explicitly stated package, then it is listed by deborphan, but not automatically uninstalled as you state freebsd did.

    this allows you to track what packages you intentionally/explicitly installed (and which were implicitly installed), which will help a user administrate packages on their machine, but won't help identify the usefulness of a package based on how recently it was used (as i believe is the original posters goal).

    [ Reply ]


    auto-apt (Score: 0)
    by Anonymous on Tuesday, January 08 @ 04:13:29 GMT

    I should imagine this would be trivial with a combination of auto-apt and *NIX last-accessed filestamps or such. The tools are all there, it'll just take a little glue in the form of shell script.

    [ Reply ]


    Re: auto-apt (Score: 0)
    by Anonymous on Thursday, January 10 @ 01:15:01 GMT

    the problem with this idea is that it assumes the files are completely untouched, which may be confounded by things like find, ldconfig, etc.

    now, this may be no issue at all, but doesn't the locate database scan every single directory, causing the directory's access time to change? you'd want to at least exclude those. and i'm fairly certain that ldconfig does some reading of the file to check that it is at least a valid library (gets the symbols out of it).

    you'd need to basically ignore .so files, which would make most of the lib* packages undetectible by this process (as you'd have to pretty much assume you're going to ignore the access time on the documentation directory.

    ashridah

    [ Reply ]


    Re: Unused Packages (Score: 0, Offtopic)
    by Baloo_Ursidae on Tuesday, January 08 @ 04:39:40 GMT
    (User Info) http://ursine.dyndns.org/

    There's gotta be something out there involving popularity-contest.

    [ Reply ]


    Re: Unused Packages (Score: 1)
    by undefined (undefined(at)engineer.com) on Tuesday, January 08 @ 06:36:32 GMT
    (User Info)

    i believe, dear chap, you have found the needed ingredient: statistical collection of package usage, whether through the package popularity-contest or some other package accomplishing the same task (but not necessarily anonymously emailing debian developers).

    i would expect that to be the hard part, and the popularity-contest package could probably be borrowed from to accomplish the specific/single task of tracking package use, and the same package's cron script could be manipulated to uninstall packages when unused for a period of time instead of email the debian developers.

    now, can somebody create this new package: "unpopularity-contest-uninstall". 😉

    [ Reply ]


    Yes: pkgusage (Score: 0)
    by Anonymous on Tuesday, January 08 @ 06:48:40 GMT

    Get it here.

    Cheers //Johan (shameless self-promoter 🙂

    [ Reply ]


    Try this simple script (Re: Unused Packages) (Score: 1)
    by Tor on Tuesday, January 08 @ 07:56:27 GMT
    (User Info) http://slett.net/

    http://slett.net/debcruft.gz

    By default, it lists packages whose files have not been accessed for 90 days or more. Override with "-ndays", e.g.: a

    debcruft -60

    [ Reply ]


    Try this simple script (Re: Unused Packages) (Score: 0)
    by Anonymous on Tuesday, January 08 @ 13:30:14 GMT

    Nice script. It gets confused by diversions, so you should probably change the line:

    files=$(dpkg --listfiles "$pkg")

    to

    files=$(dpkg --listfiles "$pkg" | grep -v "^diverted by")

    This is really handy. Thanks!

    [ Reply ]


    Try this simple script (Re: Unused Packages) (Score: 1)
    by Tor on Wednesday, January 09 @ 01:10:31 GMT
    (User Info) http://slett.net/

    Doh. Yes, I ran into that issue also, and actually changed my local version (but forgot to gzip it).

    Fixed. Thanks. 🙂

    [ Reply ]


    Try this simple script (Re: Unused Packages) (Score: 0)
    by Anonymous on Wednesday, January 09 @ 00:22:58 GMT

    A splendid tool thanks a lot. - got rid of 15.000 files of obsolete configurations.

    -- AvH

    [ Reply ]


    Try this simple script (Re: Unused Packages) (Score: 1)
    by MrCooper on Wednesday, January 09 @ 03:27:54 GMT
    (User Info) http://debian.org/~daenzer

    Neato, but it produced a lot of noise on stderr and otherwise mostly packages I had already removed. Which of course speaks for the quality of debfoster. 🙂

    I'd really love to see a kind of timer feature for debfoster...

    [ Reply ]


    debfoster's great (Score: 1)
    by fog on Tuesday, January 08 @ 08:42:39 GMT
    (User Info)

    debfoster is a great little program. the first time you run it, it will ask what packages you want to keep and build a keepers list, i.e., a list of packages that 'keep' installed other packages, libraries, etc. then, on subsequent runs, it will notice keepers removals and will ask you again about the now 'unlocked' packages. really usefull to remove old cruft like unused libraries and installed but never used packages.

    extending debfoster to support for timeouts would be great. i can imagine anwering debfoster's questions about keeping packages not only yes/no but with a value (in days) on how long debfoster should shutup before asking me the same question again. if i want to test a couple of new progarms i can set the timeout to 30 days and have debfoster remember me about them after a month. obviously VIP applications can have an infinite timeout...

    ok, apt-get install debfoster now...

    [ Reply ]


    what i'd love to see is this... (Score: 0)
    by Anonymous on Tuesday, January 08 @ 09:30:50 GMT

    I'd like a way to remove all the dependencies of a package that are unused by anythhing else when uninstalling something. For instance, say i want to try a new e-mail client. So i try something from gnome project, nah not what i had in mind, so now i go to remove it and it only removes the package itself not any of the many dependencies that are unused by any other packages. So now i try the KDE one, nope not keen on that either, but now i have some more unused libs sitting around. Ok i try a console client, good but not quite, again more unused libs...so i try one more console one and i like it. Ok i'm sticking with that...except now i have the libs from 4 e-mail clients and desktop projects even though i only use wmaker and the console...

    It would be great if there was a way to tell apt to remove the packages and any unused dependencies of that app. I mean sure you can try and keep track of everything that was installed freshly with that app...but that is a pain in the ass, if it can handle dependencies one way, why not take care of em on the way out to? i'd be much more likely to experiment with new apps and try out more software if this worked, right now i just stick with my old stand bys that may or maynot have been surpassed in recent years by some newer projects...but i don't have the patience to go through and pick out the unused stuff by hand after i remove it...

    just a thought, could be a handy feature...

    then again maybe a third party apt front end that i didn't try due to said issue does handle this hehe...

    [ Reply ]


    Re: what i'd love to see is this... (Score: 0)
    by Anonymous on Tuesday, January 08 @ 09:33:54 GMT

    oh hehe should have finished reading all the posts first, looks like debfoster can do this, excellent.

    [ Reply ]


    Based on: PHP-Nuke

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2000 by Debian Planet

    You can syndicate our news using the file backend.php.