As I understand it, the answer is Pkg.rm
followed by Pkg.add
(see How to activate a package in a script? - #19 by fredrikekre).
However, I find it easier to roll my own package registry. Then I just need to make a blank environment on the remote and issue Pkg.add(A)
.