Sample Header Ad - 728x90

Replicating "world" (set of installed packages) on another Alpine Linux system

2 votes
0 answers
51 views
When using Alpine Linux normally, it's easy to install a set of packages and then just transfer the /etc/apk/world file over to another system (followed by apk fix on the other system) to ensure that both systems have the same set of packages installed. However, when using apk add -t to add a "virtual package", as in
# apk add -t bash-all bash bash-doc
(Adds a virtual package called bash-all that depends on both the bash and the bash-doc package.) ... then this would add an entry such as
bash-all=20250803.041246
... in the /etc/apk/world file. This entry is "useless" on the other system as it says nothing about what the virtual package depends on. What's the "proper" way to ensure that my other Alpine Linux system is kept in sync with regard to packages installed, _given that the system is using virtual packages_? ("My other Alpine Linux system", could be an actual other system, or it could be the system I'll get after performing a reinstall of my current Alpine Linux system.) --- I've played around with copying both /etc/apk/world and /lib/apk/db/installed (which contains the actual packages installed, their dependencies, and other metadata), but without being able to figure out a way of triggering the target system to perform the correct(-ive) package installations/uninstallations.
Asked by Kusalananda (354497 rep)
Aug 8, 2025, 02:18 PM
Last activity: Aug 8, 2025, 04:19 PM