I'd like to do something to what google and epel in regards to installing a repository via a deb package, but have the 'packaged repo' get removed if I remove all packages that depend on it. If it was also installed as a dependency, this would make adding/removing repos a package management job instead of the external/manual process it is now.
I thought about dynamically creating a local_apt_repo with metapackaged debs that depend on the packaged_repo so apt-get autoremove would theoretically work:
If the metapackages are configured to depend on the packaged_repo_X, packaged_repo_Y packages, and we put them all in that local repository, would that give us the ability to depend on packaged_repos and have them installed/available to our metapackages with pre-depends?
The google chrome deb also add the google repo:
From https://www.google.com/chrome/eula.html?platform=linux :
Note: Installing Google Chrome will add the Google repository so your system will automatically keep Google Chrome up to date. If you don't want Google's repository, do "sudo touch /etc/default/google-chrome" before installing the package.
And the epel repo is added to rhel, centos, and fedora via a single rpm: