Description
Explanation with an example:
- I'll build
my-appfrom source. - It requires some dependencies. Install them with
apt-get install foo bar baz. - Build the application.
- Install another package (
hello.deb) which has a dependency tofoo. - Remove
my-appsome time later by deleting entire source folder. - Remove the dependencies of
my-app.
However, in step 6, you can't simply issue apt-get remove foo bar baz for the dependencies, because hello.deb still needs foo package, so only bar and baz packages should be removed.
Proposal
In order to solve this problem, a dummy package may be created which declares the dependence of foo, bar, baz and we might simply install this dummy package. Later on, we can safely uninstall all those dependencies by uninstalling this dummy package. A wrapper script would build such a package on the fly and install it:
$ apt-get-named install foo bar baz
Intention: for-myapp
Question
Would this approach work for the problem? Is there any implemented solutions for such a problem? How can we create a dummy package for such a purpose?
apt-get autoremove?