I think Alpine can do what you're asking for using virtual packages (which is basically just a label that you apply to say "the following packages are a group to be installed and removed together"): https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk....