Alpine Linux’s apk stores a list of required packages for the current system in a single file, /etc/apk/world. using apk add or apk del adds or removes a package from this list, then calculates how to get to that stage (adding all the dependencies, resolving conflicts…) and then installs the needed stuff (and removes the unneeded) to make it match.
The file can be edited or replaced using any other tools, then apk fix will do the same recalculation and installation/removal steps.
There are some package managers that do that.
Alpine Linux’s
apk
stores a list of required packages for the current system in a single file,/etc/apk/world
. usingapk add
orapk del
adds or removes a package from this list, then calculates how to get to that stage (adding all the dependencies, resolving conflicts…) and then installs the needed stuff (and removes the unneeded) to make it match.The file can be edited or replaced using any other tools, then
apk fix
will do the same recalculation and installation/removal steps.