Split to multiple bash commands.
This can fix the error "/bin/bash: Argument list too long", if we get a
really long apk list.