How do I force Juju to deploy a fresh charm, not a cached one?

Is there a way with juju commands to clear the juju charm cache for a particular charm from a running bootstrap node?

I'm writing a charm and for during development when I've made changes to a charm but don't commit a revision update I want to be able to iterate quicker.


You can use the -u option to juju deploy to speed iteration during development of your charms:

  -u, --upgrade         Deploy the charm on disk, increments revision if
                        needed

e.g.,

juju deploy -u charm-name

I recently tried this and got:

$ juju deploy -u --repository=./charms local:trusty/node-app openmotion

Added charm "local:trusty/node-app-24" to the environment. --upgrade (or -u) is deprecated and ignored; charms are always deployed with a unique revision.`

So it seems -u is no longer necessary, at least as of juju 1.18.