How to clean up Slurm¶
Removing all Charmed HPC resources?
If you are planning to tear down the entire Charmed HPC environment - all models, storage and controllers - you can jump to How to clean up cloud resources instead to remove all resources, including Slurm, in a single step.
This how-to guide shows you how to remove a previously deployed Slurm workload manager in a Charmed HPC cluster.
Destroy Slurm¶
Data loss warning
Destroying your Slurm deployment may result in permanent data loss. Ensure all data you wish to
preserve has been migrated to a safe location before proceeding, or consider using the flag
--release-storage with juju destroy-model to release the deployment’s storage
rather than destroy it.
Use juju destroy-model to destroy your Slurm deployment. You will need to provide
the name of the model your Slurm deployment is located in. For example, to destroy to Slurm
deployment located in the slurm model, run:
juju destroy-model --no-prompt --destroy-storage slurm
Tip: List available Juju models
juju models can be used to determine the models you have access to:
user@host:~$ Controller: charmed-hpc-controller
Model Cloud/Region Type Status Machines Cores Units Access Last connection
controller charmed-hpc/default lxd available 1 - 1 admin just now
identity charmed-hpc/default lxd available 0 - - admin 2026-02-13
slurm* charmed-hpc/default lxd available 7 4 8 admin 2026-02-26
storage charmed-hpc/default lxd available 0 - - admin 2026-02-09
Forcibly destroy a stuck Slurm deployment¶
Your model may become stuck if any of Slurm’s service are in an error state during
the model cleanup process. You can determine if your model is stuck by seeing repeated
Waiting for model to be removed messages printed to the terminal.
If your Slurm model is stuck, add the --force flag to juju destroy-model to
destroy your Slurm deployment and ignore errors:
juju destroy-model --no-prompt --destroy-storage --force slurm
See the Juju destroy-model documentation
for the implications of using the --force flag and details of further
available options.
Next Steps¶
Now that you have destroyed your Slurm deployment, you can also clean up your cloud resources:
You can also revisit How to deploy Slurm if you want to create a new Slurm deployment.