← Back to issue list

Add option to clean all parts

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1995365
Type
issue
State
closed
Author
~rastersoft-gmail
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed not a bug

Reason: Maintainer mr-cal closed the proposal as an unsupported niche use case, pointing to snap injection improvements and Squid apt caching instead. No parts-only implementation or resolving commit was found.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Currently, executing a "snapcraft clean" will destroy any container used to build a snap. There is the option of using "snapcraft clean PART_NAME", and that will just clean that part and rebuild it and any part that depends on it. Unfortunately, there is no way of cleaning all the parts to trigger a full rebuild without deleting the container and having to pull all the snaps and packages needed to build the container. So, it would be useful to add "snapcraft clean --parts-only" or "snapcraft clean --all-parts" to just clean all the parts but without destroying the container.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug 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.
stealth/space-bunny-alpha — closed not a bug Proposal to clean all parts without destroying the build container was declined as a niche use case; maintainers preferred snap injection improvements and Squid apt caching.
qwen/qwen3.6-35b-a3b — — Request to add a flag for cleaning all parts without destroying the build container was rejected. Maintainers closed it as niche, opting instead to fix slowness via local snap injection and apt caching with squid.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 10
close stale Feature request to add a flag for snapcraft clean that removes all parts without destroying the build container. No maintainer response or labels after 3.7 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 10
close stale Request to add a --parts-only or --all-parts flag to snapcraft clean to rebuild all parts without destroying the build container. Untriaged and inactive for ~3.7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 15
Confidence: 85
Support Request: 10
needs triage Request to add a flag to snapcraft clean that removes all build parts without destroying the underlying build container. Unlabelled and inactive for over 3 years.

Update history

Date Change
created

Related work

  • Related To: snapcraft#2174 (confidence 95%)

    Snap injection improvement cited as part of the underlying performance work.

  • Related To: snapcraft#5354 (confidence 95%)

    Commit 67463796f added Squid apt-cache coverage, matching the caching approach cited by the maintainer.

Related issues

Issue Project State Summary Similarity
#2442 cli: enable cleaning of parts snapcraft merged Merged #2442 (5546c3aab), restoring snapcraft clean <part-name> with build providers so selected parts can be cleaned without recreating the provider.
73%
#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.
70%