If I work on a computer with no, or very bad, or limited Internet connectivity,
how to create in advance a local cache of all the tarballs of installable
ocaml software in the opam-repository?
Or, workaround but more robust, because of the possible depexts:
how to list all the installable packages for my current switch and install them, including their depexts?
opam admin filter allows you to modify a repo to only select some packages. If you want a more specific filter than what filter gives you you can generate it with opam list.
When the filter is done, you can opam admin cache and only download the packages you want.