snapcraft clean with additional arguments doesn't clean anything
Metadata
Current evaluation
Closed without resolution or comments. The bug caused snapcraft clean with arguments to crash with a FileNotFoundError when launching a VM. Likely abandoned due to inactivity.
Suggested action: —
No scores available.
Issue body
When calling `snapcraft clean`, the multipass VM is deleted as expected. However, when calling with additional arguments such as `snapcraft clean xyz`, then a multipass VM is launched, but no data is sent to the VM from the project so it fails with a stack trace like this:
$ snapcraft clean xyz
Launching a VM.
[Errno 2] No such file or directory: '/root/project'
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: view
Traceback (most recent call last):
File "/snap/snapcraft/3270/bin/snapcraft", line 11, in <module>
load_entry_point('snapcraft==3.7.1', 'console_scripts', 'snapcraft')()
File "/snap/snapcraft/3270/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/3270/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/3270/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/snap/snapcraft/3270/lib/python3.5/site-packages/snapcraft/cli/_command.py", line 85, in invoke
return super().invoke(ctx)
File "/snap/snapcraft/3270/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/3270/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/3270/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 317, in clean
project = get_project(is_managed_host=build_environment.is_managed_host)
File "/snap/snapcraft/3270/lib/python3.5/site-packages/snapcraft/cli/_options.py", line 106, in get_project
os.chdir(os.path.expanduser(os.path.join("~", "project")))
FileNotFoundError: [Errno 2] No such file or directory: '/root/project'
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]:
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments. The bug caused snapcraft clean with arguments to crash with a FileNotFoundError when launching a VM. Likely abandoned due to inactivity. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The bug caused a crash when running snapcraft clean with arguments due to a missing project directory path. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1615060 snapcraft clean is incomplete | snapcraft (launchpad) | closed | Reporting that snapcraft clean skips local .snap files was closed without comments or resolution, indicating the report was abandoned or left unresolved. | |
| #1561546 Snapcraft clean removes local plugins | snapcraft (launchpad) | closed | Closed without a documented fix or resolution. The bug where snapcraft clean incorrectly removes local plugins remains unaddressed, likely abandoned due to prolonged inactivity. | |
| #1703344 snapcraft cleanbuild exits with a traceback when lxd is not installed | snapcraft (launchpad) | closed | Closed without resolution. Missing LXD caused a FileNotFoundError during snapcraft cleanbuild. No comments, fixes, or status updates were provided. | |
| #1746359 snapcraft cleanbuild --debug should provide guidance on build failure | snapcraft (launchpad) | closed | Closed as abandoned due to inactivity. The requested debug shell guidance for snapcraft cleanbuild was never implemented. | |
| #1800121 sudo snapcraft cleanbuild | snapcraft (launchpad) | closed | Closed without resolution, likely abandoned. Reported a FileNotFoundError during snapcraft cleanbuild when archiving a Firefox cache directory. | |
| #1675516 can't cleanbuild snapcraft itself | snapcraft (launchpad) | closed | Closed without resolution or comments, the report of a failed snapcraft cleanbuild due to missing build-packages was abandoned. | |
| #1799925 snapcraft gives conflicting advice for cleaning parts | snapcraft (launchpad) | closed | Closed without a fix. Snapcraft incorrectly advised running snapcraft clean with part and step flags, which were unsupported. The author worked around it with a full clean. The report appears abandoned or superseded by later updates. | |
| #1800119 snapcraft cleanbuild | snapcraft (launchpad) | closed | Closed without resolution. The report details a PermissionError during snapcraft cleanbuild caused by restricted access to the .aptitude directory. With zero comments and no fix applied, the issue was abandoned or marked stale. | |
| #1609803 snapcraft cleanbuild --no-clean-up | snapcraft (launchpad) | closed | Feature request to add a --no-clean-up flag to snapcraft cleanbuild was closed without implementation. The issue appears abandoned or declined, with no comments or resolution details provided. | |
| #1723965 snapcraft doesn't work | snapcraft (launchpad) | closed | Closed without resolution or comments, indicating abandonment. The reported snap command failure and GL driver errors remain unresolved. |