Minimal apt install
I was recently working on a bootstrap script that, among other things, needed to install a fairly large number of apt
packages. The list of packages was pre-existing, and had grown organically over several years. As most apt
users would
know, many packages require a significant number of dependenecies, and so it's pretty likely that any significant list
of apt packages would include at least some transitive redundancy. So, mostly as a mental exercise, I started
pondering how I could go about reducing any set of required apt packages to tha minimal set that would still include all
of the same dependencies.
It actually proved to be pretty easy in the end. But first, I needed to find a reliable way to fetch the list of
dependencies for any given package. The apt-cache
utility does the job, but I had to sort through some misinformation
online re the command's output format. You read about that in the previous Pipes in apt-cache
Output post.