How to determine minimal packages to install to replicate a base installation ------------------------------------------------------------------------------ 20 Sep 2018 GLF When installing GLFPE, a large number of packages must be added to a standard base Debian or Raspbian installation to provide the library and application functionality expected. There is a simple way to determine the list of all installed applications currently installed in a Debian (or Ubuntu or Mint) installation: dpkg-query -W | cut -f 1 > ./filesystem.packagenames The file "filesystem.packagenames" will then list all the installed packages, sorted alphanumerically, one name per text line. This is typically used to generate an inventory which can be used to compare one installation to another, or to generate a reinstallation script to guarantee regeneration of the base GLFPE environment upon a new release od Debian. However, the list includes a large number of redundant elements. Using apt-get or Synaptic will automatically install any available dependencies for each named package. If an installation script is generated directly from the above list, many dependencies will be redundantly referenced, which incurs extra attempts to install. No harm is done, but the list can be very long. Currently a web search shows no published general method for determining the minimal list of packages which when installed will guarantee ALL required packages will be installed, without redundant references to dependencies. GLF has created a small set of bash scripts which can produce a "sudo apt-get" script which will install such a minimal subset of packages. Unpack the scripts in the archive "determine_minimal_packages.tar.gz" to the home (~) folder and run "determine_minimal_packages.sh" from there. A new script will be generated (along with intermediate files of some interest) which will allow scripted installation of the minimal package set. In practice this generates a package list about 2/3 of original inventory size (or smaller).