← Back to issue list

cli: enable cleaning of parts

View original Github issue

Metadata

Project
snapcraft
Number
#2442
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged #2442 (5546c3aab), restoring snapcraft clean <part-name> with build providers so selected parts can be cleaned without recreating the provider.

Resolution: closed resolved

Reason: PR #2442 was merged as commit 5546c3aab, addressing LP #1779136 by enabling cleaning of specified parts inside existing build providers.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Bring back snapcraft clean <part-name> when using build providers. LP: #1779136 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #2442 (5546c3aab), restoring snapcraft clean <part-name> with build providers so selected parts can be cleaned without recreating the provider.
stealth/space-bunny-alpha — closed resolved Merged PR #2442 (5546c3aab) restored snapcraft clean <part-name> with build providers, addressing LP #1779136 by cleaning selected parts without deleting the provider.
qwen/qwen3.6-35b-a3b — — Merged PR restoring snapcraft clean <part-name> functionality for build providers. Reviewers noted edge cases with dependent parts and suggested future improvements for VM-level cleanup, but the feature was successfully integrated.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Restores the snapcraft clean command for build providers, enabling selective part cleanup. The update was accepted despite reviewer notes on dependent part edge cases and suggestions for VM-level cleaning enhancements.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1779136 build provider support to clean parts snapcraft (launchpad) closed Build-provider support for cleaning selected parts was restored by merged canonical/snapcraft PR #2442 (commit 5546c3aab), without deleting the provider.
86%
#4806 Build "part" action forces clean build snapcraft closed Fixed by merged craft-parts PR #727, which limits step reruns and cleaning to explicit requests, restoring incremental `snapcraft build <part>` behavior.
77%
#3284 build providers: rename clean() -> clean_parts() to clarify scope snapcraft merged Merged into master as commit 81ade060c: build provider clean() renamed to clean_parts() (5 files, +9/-9) to distinguish parts cleanup from clean_project() and other build instance cleanup.
74%
#1995365 Add option to clean all parts snapcraft (launchpad) closed Proposal for snapcraft clean --parts-only or --all-parts was declined; no option was added because snap injection and Squid apt caching address rebuild overhead.
73%
#2507 build providers: improve handling in snap logic snapcraft merged Merged snapcraft#2507 as commit 841b41fa3, improving build-provider snap logic, removing unnecessary sudo calls, and silencing refresh-hold noise.
72%
#56 "<appname> clean" doesn't remove the build instance craft-application closed Fixed clean behavior: with no parts, craft-provider build instances are removed; part-specific cleans still run inside instances. Resolved by merged PR #88 (commit 2d2dd70e).
71%
#1537786 lifecycle: allow do clean rebuild of all/parts without having to pull all again snapcraft (launchpad) closed Added per-part, per-step clean commands via merged canonical/snapcraft PR #401 (88d21b180), allowing lifecycle rebuilds without recloning all sources.
71%
#3572 cli & providers: pass part names for lifecycle commands (CRAFT-481) snapcraft merged PR #3572 merged as f0e722b17 (commit b1ae32a69), fixing lifecycle commands to forward part names to managed Snapcraft in build environments and correcting the 'parts' type annotation in lifecycle execute(). Closes LP #1897337 (CRAFT-481).
71%
#1734145 snapcraft clean <part-name> destroys everything when using containers snapcraft (launchpad) closed Fixed targeted container cleanup: `snapcraft clean <part>` no longer deletes the LXD container while other parts remain; merged in #1762 (dbce9a058).
71%
#1897337 snapcraft build <part> ignores the part snapcraft (launchpad) closed Selective part builds were restored by snapcore/snapcraft#3572, which passed named parts into lifecycle planning instead of building every defined part.
70%