`clean` command only cleans `build-for` for the host system
Metadata
Current evaluation
Closed without a linked complete fix; commit 07e89deb added clean --platform, but canonical/charmcraft#2078 later reported all-platform cleaning still failed.
Resolution: closed stale
Reason: No resolving PR or maintainer closure comment was recorded; the sole comment only created internal ticket CRAFT-3255. Commit 07e89deb added partial platform support, while canonical/charmcraft#2078 reported that clean still failed to cover every platform.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
`clean` only cleans up with `build-for` being the host system.
Expected behaviour would be:
- If no `--build-for` or `--platform` is declared, clean all build containers (if a part is declared, clean that part in each build container)
- `clean` should have `--build-for` and `--platform` so it can clean for only those archs/platforms.
### To Reproduce
Build a charm for another architecture, then run `charmcraft clean`
### part yaml
_No response_
### Relevant log output
```shell
n/a
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Closed without a linked complete fix; commit 07e89deb added clean --platform, but canonical/charmcraft#2078 later reported all-platform cleaning still failed. | |
| stealth/space-bunny-alpha | — | closed stale | No fix was linked before closure; the only comment recorded internal ticket CRAFT-3255. Follow-up canonical/charmcraft#2078 reported that clean still failed to cover all platforms. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The clean command limitation remains unaddressed. Tracking was moved to internal Jira ticket CRAFT-3255. No fix or merge was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The clean command remains limited to the host system. No fix was implemented, and the issue appears abandoned following an automated Jira ticket creation. |
Update history
No update history recorded yet.
Related work
-
Related To:
craft-application@07e89deb
(confidence 90%)
Added --platform support for clean, but did not demonstrably resolve default all-platform cleaning.
-
Related To:
canonical/charmcraft#2078
(confidence 90%)
Follow-up report stating that clean still failed to cover all platforms.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2078 `charmcraft clean` does not clean all platforms for charm | charmcraft | open | Open, reproducible cleanup bug: charmcraft clean uses current project platforms to derive build instances, leaving containers for removed platforms; no resolving fix is linked. |