[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Reference counting for packages (finding unused packages)



I would like to know what packages I don´t need anymore when removing
a package. At the moment one can only look at the dependencies
manually and try to deinstall them if one doesn´t know what to do with 
them.

This mechanism could be automated by a simple reference counting.

When the user installs a package, then the reference count is
increased by one, when deinstalling it the count gets decreased.

When a package <bla> depends on package <foo>, then the reference
count for <foo> is increased by one when <bla> is installed and
decreased when <bla> is removed.

When a Package with a reference count of 0 is found the user is asked
whether he wants to keep it (in which case it gets its count increased 
by one) or to deinstall it.

Also an option could be provided to not increase the reference counter 
when installing a package. The package could then be tested and on the 
next dpkg/dselect/apt action the admin would be asked whether it can
be deinstalled or not. Thereby you could test packages and would be
reminded to deinstall them (or to keep them if they are good).

What do you think about this?

May the Source be with you.
			Goswin

PS: I know that reference counting might fail and not notice that
something could be removed, but those rare cases could be found easily 
and noted so that it can be taken care of.


Reply to: