This looks like a cool tool (I saw it referenced on IRC).
I think it could be more useful if the dependencies of both metapackages were collected. Then, a single apt line could be written to install needed packages, remove unneeded packages, and leave alone the packages that are needed in both metapackages.
This way, it wouldn't remove packages that would then be reinstalled seconds later.
Once it leaves alone packages that will don't change, it could be switched to an apt-get purge command instead. (purge can install packages, too, if you suffix them with a +.)
For example:
$ sudo apt-get purge libgweather-common pdns-tools+
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libgweather-common*
The following NEW packages will be installed:
pdns-tools
0 upgraded, 1 newly installed, 1 to remove and 12 not upgraded.
Need to get 1,165 kB of archives.
After this operation, 7,602 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://wopr/ubuntu bionic/universe amd64 pdns-tools amd64 4.1.1-1 [1,165 kB]
Fetched 1,165 kB in 0s (3,227 kB/s)
(Reading database ... 257756 files and directories currently installed.)
Removing libgweather-common (3.28.2-1~ubuntu18.04.1) ...
Selecting previously unselected package pdns-tools.
(Reading database ... 257750 files and directories currently installed.)
Preparing to unpack .../pdns-tools_4.1.1-1_amd64.deb ...
Unpacking pdns-tools (4.1.1-1) ...
Processing triggers for libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.2) ...
Setting up pdns-tools (4.1.1-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
This looks like a cool tool (I saw it referenced on IRC).
I think it could be more useful if the dependencies of both metapackages were collected. Then, a single apt line could be written to install needed packages, remove unneeded packages, and leave alone the packages that are needed in both metapackages.
This way, it wouldn't remove packages that would then be reinstalled seconds later.
Once it leaves alone packages that will don't change, it could be switched to an apt-get purge command instead. (purge can install packages, too, if you suffix them with a
+
.)For example:
Using
purge
would clean up old configs, too.Thanks