How to remove a unit

See also:

To remove individual units instead of the entire application (i.e. all the units):

juju remove-unit <unit>

For example:

juju remove-unit postgresql/2

In the case that the removed unit is the only one running the corresponding machine will also be removed unless any of the following is true for that machine:

  • it was created with juju add-machine
  • it is not being used as the only controller
  • it is not hosting Juju-managed containers (KVM guests or LXD containers)

To remove multiple units:

juju remove-unit mediawiki/1 mediawiki/3 mediawiki/5 mysql/2

The --destroy-storage option is available for this command as it is for the remove-application command above.

As a last resort, use the --force option (in v.2.6.1).

Last updated 4 months ago.