When building software, I sometimes need to install libraries, binaries, etc. which are only required to build the package but then I forget about removing them, so I end having to cleanup several packages at once; even those that I don't want to remove.
Parsing the log files to find the exact packages is suboptimal and a royal pain if the packages are old enough. Is there a way to facilitate this task?
Best Answer
I would suggest using user tags, which is a characteristic of aptitude (apt binary doesn't have this) would help with that. When installing packages add the
--add-user-tag
option when installing the packages, for example:and to remove them just use:
You can also remove the tag along the way with
--remove-user-tag build-dep-package
.But this pose a problem, what about if the same package has both tags? Well, you just use the and/not conditionals to prevent that from happening:
To manipulate several packages with different tags use or:
Through this is very useful in the long run, I haven't found a way to list all the current active tags.