On Tue, Aug 4, 2009 at 12:47 PM, Luis Useche<use...@gmail.com> wrote: > This is really close but it is not there quite yet. Even with this > script, there could be situations where you end up deleting things you > don't want. For instance, let say you install xfce. After some time, > you decided to install some package X that depend on xfce and other > library L used only by X. When using your script, it will remove not > only L but also xfce (which you did not want to remove because you > installed it manually). > > Besides, there is another problem with the script. If you imagine the > packages installed in the system as a tree of dependencies, you can > see that your script will only remove two levels of the branch you > want to delete. Example: X depends on Y that depends on Z: X -> Y -> > Z. In your script, X and Y will be removed but Z will not. > > It seems like an additional information should be added to the package > database. A bit indicating if the package was installed manually by > the user (admin?) or not. Then, the package can only be deleted if the > the user explicitly say so as oppose to "automatic deletion as > dependency".
This still doesn't work. If I pkg_add eclipse, then later decide I'm going back to vim, that doesn't mean I want all my java programs to suddenly stop working. What's installed manually vs not is not reliable. I don't think I've ever actually requested installing unzip, but it's on every computer I use and I use it all the time. The tools are provided to identify possibly orphaned packages. What to do about them should (and can) only be the user's decision.