How to remove an application
An application can be removed with:
juju remove-application <application-name>
juju remove-application apache2
This will remove all of the application’s units. All associated machines will also be removed providing they are not hosting containers or another application’s units.
If persistent storage is in use by the application it will be detached and left in the model. However, the
--destroy-storage option can be used to instruct Juju to destroy the storage once detached.
Removing an application which has relations with another application will terminate that relation. This may adversely affect the other application. See section Removing relations below for how to selectively remove relations.
As a last resort, use the
--force option (in
A charmed operator is the means by which an application is installed. There is therefore no method to remove a charm. Removal should be done at either the unit or application level.
A bundle is not a logical entity that can be removed. Once a bundle is deployed, applications can evolve in numerous ways that are not tracked and associated with the original bundle. For complex deployments, the recommendation is to deploy on a per-model basis so the removal of a complex deployment becomes equivalent to the removal of a model.
An application offer (for a cross model relation) is removed with:
juju remove-offer <offer url>
juju remove-offer hosted-mysql
The attempt will fail if a relation has already been made to the offer. To override this behaviour the
--force option is required, in which case the relation is also removed.
Note that if the offer does not reside in the current model then the full URL must be used:
juju remove-offer prod.model/hosted-mysql
Last updated 10 months ago.