← 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
Updated
Closed

Current evaluation

Feature request for a prune-instances command in craft-application to remove non-base provider instances, with optional provider flags and tests. Unimplemented; blocked on craft-providers work; still needed by charmcraft#1042.

Suggested action: keep open

Reason: This is a maintainer-filed, labelled enhancement (Type: Enhancement) that is clearly scoped and still relevant: no 'prune' command exists in the codebase (only ProviderService.clean_instances for project-scoped cleanup), and the dependent consumer charmcraft#1042 is confirmed still open. The issue explicitly requires craft-providers#639 and #893, so it is blocked on external work rather than abandoned; inactivity alone (~7 months, 0 comments) does not make it irrelevant.

Impact: 45 Quick Win: 24.75 Staleness: 55 Complexity: 45 Confidence: 75 Support Request: 0

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

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 24.75
Staleness: 55
Complexity: 45
Confidence: 75
Support Request: 0
keep open Feature request for a prune-instances command in craft-application to remove non-base provider instances, with optional provider flags and tests. Unimplemented; blocked on craft-providers work; still needed by charmcraft#1042.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 40
Confidence: 75
Support Request: 5
needs triage Enhancement request to add a prune-instances command with provider filtering and template support. Open for six months with zero comments or maintainer interaction, awaiting prioritization and assignment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Enhancement to add a prune-instances command for removing non-base instances across providers. Currently untriaged with no maintainer comments or assignee for nearly five months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 45
Confidence: 80
Support Request: 10
needs triage Add a prune-instances command to remove non-base instances across providers, including unit and spread tests. Currently unassigned, stale, and blocked by external dependencies awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#1042 (confidence 90%)

    Issue body says 'Required for charmcraft#1042'; that issue is confirmed still open and discusses the same purge/clean-all-instances capability.

  • Blocked By: canonical/craft-providers#639 (confidence 85%)

    Issue body states 'Requires craft-providers#639'; charmcraft#1042 also lists it as a blocker.

  • Blocked By: canonical/craft-providers#893 (confidence 85%)

    Issue body states 'Requires craft-providers#893'.

Related issues

Issue Project State Summary Similarity
#1058 feat: add prune instances craft-application open Adds a prune-instances command to craft-application (closes #991), +249/-2 across 9 files. Author updated the craft-providers pin per maintainer guidance, but has been silent since 2026-05-05; 28 unresolved review comments and several failing CI checks remain.
78%