--destructive-mode is not available in `snapcraft clean`
Metadata
Current evaluation
Added --destructive-mode support to snapcraft clean in snapcore/snapcraft PR #2577, enabling host-side project artifact cleanup.
Resolution: closed resolved
Reason: The linked resolving change implemented the missing clean-command option. The issue was closed after snapcore/snapcraft PR #2577 added host-mode cleanup support.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Currently it is not possible to clean a snap project artifacts in --destructive-mode, when the `snapcraft clean --destructive-mode` command is called, it returns:
```
Error: no such option: --destructive-mode
```
## WORKAROUND ##
Use `SNAPCRAFT_BUILD_ENVIRONMENT=host snapcraft clean` instead.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Added --destructive-mode support to snapcraft clean in snapcore/snapcraft PR #2577, enabling host-side project artifact cleanup. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/snapcraft#2577 (commit 2d661c723), adding --destructive-mode to snapcraft clean. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a recorded fix, linked PR, or closing comment. The issue provided the workaround SNAPCRAFT_BUILD_ENVIRONMENT=host snapcraft clean. | |
| stealth/space-bunny-alpha | — | closed stale | Closed as abandoned without a fix after years of inactivity; use SNAPCRAFT_BUILD_ENVIRONMENT=host snapcraft clean as the documented workaround. | |
| qwen/qwen3.6-35b-a3b | — | — | The missing --destructive-mode flag for snapcraft clean was reported. A workaround using SNAPCRAFT_BUILD_ENVIRONMENT=host was provided. The report was abandoned and closed without a fix. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The snapcraft clean command lacks --destructive-mode support; users are advised to use SNAPCRAFT_BUILD_ENVIRONMENT=host as a workaround. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments. The --destructive-mode flag for snapcraft clean was not fixed; the issue was abandoned, with the reporter providing a SNAPCRAFT_BUILD_ENVIRONMENT=host workaround instead. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The --destructive-mode flag remains unsupported for snapcraft clean. The SNAPCRAFT_BUILD_ENVIRONMENT=host environment variable is provided as a workaround. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#2577
(confidence 99%)
The maintainer linked this PR directly as the implementation resolving the missing --destructive-mode option.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2577 cli: Add --destructive-mode to clean | snapcraft | merged | Merged in snapcraft#2577 via commit 2d661c723, adding --destructive-mode support to clean so wrapper scripts can pass it to lifecycle commands. | |
| #1904913 Destructive mode not available | snapcraft (launchpad) | closed | Resolved as a configuration requirement: snapcraft.yaml needed a base key; modern Snapcraft versions require base for every project. | |
| #6001 `snapcraft clean --destructive` does not delete `.craft` directory | snapcraft | open | Destructive-mode clean leaves the .craft build-state directory behind; the report has an exact reproducer on Snapcraft 8.13.2 but remains untriaged. | |
| #227 cli: add --destructive-mode flag | rockcraft | merged | Merged PR #227 as commit 84f76b85, adding --destructive-mode so ROCKs can be built directly on the host, matching Snapcraft and Charmcraft. | |
| #1791201 add support for --destructive-mode | snapcraft (launchpad) | closed | Host builds via --destructive-mode landed in merged PR canonical/snapcraft#2339 (commit 024c63453), making Multipass default while retaining host builds. | |
| #57 Add "destructive" mode | craft-application | closed | Added support for --destructive-mode in commit c0dd21a3, delivering the requested in-host build feature parity. | |
| #2553 ci: use --destructive-mode to build snap in travis | snapcraft | closed | Closed unmerged after no reviews or activity; the proposed Travis change to build snaps with --destructive-mode was abandoned. | |
| #4356 Handle multi-arch builds in destructive mode | snapcraft | closed | Core22 destructive mode now warns when multiple snaps share build state; merged in PR #4839 (67de4083f) and released in Snapcraft 8.3.0. | |
| #5113 warn if `snapcraft --destructive-mode` is run by non-root user | snapcraft | closed | Enhancement request closed: snapcraft now warns when destructive-mode commands run as non-root, implemented upstream. Craft-application PR #974 (commit 4b213f68) merged and resolves this issue. |