Alex Malinovich wrote:
On Wed, 2004-03-31 at 13:35, Matthew T. Atkinson wrote:'ellow, On Wed, 2004-03-31 at 20:02, Alex Malinovich wrote:It's always good to see more new tools for Debian. But have you checked out deborphan at all? It does pretty much the same thing that your script does. If your script has advantages over the functions provided by deborphan, I'd be very interested to hear them. If you're just re-inventing the wheel for your own amusement, then kudos to you. :) I did the same thing when I wrote a debian mirroring script that basically does the same thing as debmirror only using rsync. :)Well... ours /does/ take up less disk space :-). I had no idea about deborphan before; will have to investigate it more fully. It seems very useful, though. Thanks for letting me know about it. There is another debian-related script at my site. It simply looks for packages you've removed but not purged and gives you the chance to purge them. OK; I'm going to brace myself for the news that this has been done before too :-).Well, if it HAS already been done I don't know about it. It wouldn't be hard to do it just from a command line, but a script to handle it would be nice IMO. Just make sure it shows which packages would be purged and asks for confirmation BEFORE it actually purges them... :)
I used to use a combination of apt and deborphan to keep my primary workstation lean (I try out software as it strikes me). In the past week I've discovered (rediscovered) aptitude. I had thought it was only an uninteresting (to me) interactive/GUI installer. Not so. Use it from the command line just like you would apt-get or dpkg.
It tracks packages installed automatically as dependencies, and will prompt you to remove them if as a result of a later operation they are no longer needed. This eliminates (for me) the need for deborphan.
Like I say, I've only been using it for about a week, but following are a few examples that seem relevant to what you are asking here. Use the -s option to only simulate the operation.
# aptitude purge ~cpurges files that are removed but still have config files installed ("rc" in "dpkg -l")
# aptitude search ~r~iequivalent to "deborphan -a". any package which no other lists as an important dependency, and which is installed. Maybe add '!~E' to not include essential priority packages, and '!~sbase' to not include packages in base section. '!' is the negation operator.
Be sure to read /usr/share/doc/aptitude/README for the more complete documentation if you install it.
Its tracking of automatically installed dependencies works best of course if you use aptitude right from the base install, but I've managed to get it set fairly well on my long-in-use system with a bit of tinkering.
Part of doing this for you might be, as described in an example in the man page:
# aptitude markauto ~slibswill start you off by marking all installed packages in your libs section as having been automatically installed, which is usually correct.
dircha