Why snapcraft clean ,clears apt-get cache and downloaded debian files ?
Metadata
Current evaluation
Resolved by snapcore/snapcraft PR #677 (commit a2358fcd0), globally caching stage packages so APT downloads are shared across projects instead of repeatedly fetched.
Resolution: closed resolved
Reason: The linked implementation was merged as commit a2358fcd0. It replaced part-local stage-package caching with a shared global cache, addressing repeated downloads when projects are cleaned or rebuilt.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Snapcraft clears apt-get cache and download directory inside parts/application/ubuntu/ everytime user runs snapcraft clean ?? whats the benefit of that ??
Due to this user need to download approx 28mb (in my case) of apt cache (which include 7mb+ of icons which are useless or not required for building an application :D).
Like in a normal ubuntu system we do apt-get update to get new cache ,without deleting the older one , and do apt-get install somepackage (say its version 3) will not delete all apt downloaded packages cache to get new version of app, it keep the downloaded archives in cache which is usefull and saves your Internet data and bandwidth.
So this is a bug and should be resolved soon .
My suggestions for developers- create a new command to clean apt-archive and leave it up to the users if they wana delete old debs or not .
this will also allow him create packages when he will be off-line .
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved by snapcore/snapcraft PR #677 (commit a2358fcd0), globally caching stage packages so APT downloads are shared across projects instead of repeatedly fetched. | |
| stealth/space-bunny-alpha | — | closed resolved | Reported that 'snapcraft clean' wipes the apt-get cache and downloaded .debs in the part dir, forcing ~28MB re-download each build. Closed after PR canonical/snapcraft#677 ("playing with caching") merged, moving stage-packages downloads to a global APT cache. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without explanation or a code fix after years of inactivity; no resolving PR or commit was identified. | |
| stealth/space-bunny-alpha | — | closed stale | No resolution was recorded for preserving APT archives across `snapcraft clean`; the report was closed after 63 days without discussion or a fixing PR or commit. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments. The reported snapcraft clean behavior clearing apt cache was not addressed, likely dismissed as intended design or abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution, likely abandoned or rejected. The report questioned snapcraft clean clearing apt cache and debs, requesting selective cleanup, but received no maintainer response. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed with no comments or resolution. The suggestion to preserve the apt cache was not implemented, indicating the issue was abandoned or marked as by design. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | The request to preserve apt cache during snapcraft clean was closed without discussion or resolution. The feature request was abandoned due to lack of maintainer response. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#677
(confidence 100%)
PR #677 was merged as commit a2358fcd0, titled "Globally cache stage-packages".
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #677 playing with caching | snapcraft | merged | Merged in #677 via a2358fcd0, adding a global APT cache so snapcraft clean no longer forces later builds to re-download .deb files. |