← Back to issue list

Add a prune-instances command

View original Github issue

Metadata

Project
craft-application
Number
#991
Type
issue
State
open
Author
mr-cal
Labels
Type: Enhancement
Created
2026-01-21 20:08:33+00:00
Updated
2026-02-11 15:09:49+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done * Add a new command, `prune-instances` that removes all non-base instances for the active provider using the ProviderService. The following parameters are optional: * `--all-providers` to prune instances from all providers * `--provider=<provider>` to prune for a specific provider * If this isn’t specified, use the same business logic that lifecycle commands use to determine the provider. * `--include-templates` to prune base instances * Unit tests * A testcraft spread test that runs this command to prune LXD and Multipass instances ### Why it needs to get done To allow users to prune instances. Requires https://github.com/canonical/craft-providers/issues/639 Requires https://github.com/canonical/craft-providers/issues/893 Required for https://github.com/canonical/charmcraft/issues/1042

Evaluation history

No evaluation history available.