Skip to content

guix: introduce --exclude parameter to guix-clean - #34790

Closed
kevkevinpal wants to merge 1 commit into
bitcoin:masterfrom
kevkevinpal:guixCleanExclude
Closed

kevkevinpal wants to merge 1 commit into
bitcoin:masterfrom
kevkevinpal:guixCleanExclude

Conversation

@kevkevinpal

@kevkevinpal kevkevinpal commented Mar 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is motivated by #34776 (comment) and a follow-up to #34776.

The motivation is that when a user runs contrib/guix/guix-clean it will clean the whole directory or nothing leading the user to have to manually clear out these files. It would be useful to be able to exclude certain files.

It adds the --exclude and --help/-h parameters to contrib/guix/guix-clean

Right now, when a user runs that script, it will delete everything. It makes sense to allow the user to exclude any files or directories from being removed.


Help text

Screenshot 2026-03-10 at 10 15 08 AM

Multiple excludes

Screenshot 2026-03-10 at 10 15 30 AM

Unknown option

Screenshot 2026-03-10 at 10 19 41 AM

Exclude with --force

Screenshot 2026-03-10 at 10 19 53 AM

@DrahtBot

DrahtBot commented Mar 10, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

No conflicts as of last run.

@fanquake

Copy link
Copy Markdown
Member

Concept ~0. Not sure how much further we need to complicate this script.

This is a follow-up to https://github.com/kevkevinpal/bitcoin/pull/new/guixCleanExclude

Can you fix the PR description.

@sedited

sedited commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

I'm not sure about this change either. Listing the files as done now seems good enough to me, and the changes proposed here mostly seem to complicate things.

@kevkevinpal

Copy link
Copy Markdown
Contributor Author

Thank you for the review!

Concept ~0. Not sure how much further we need to complicate this script.

Part of the reason I thought this might make sense and not add too much complication is that exclude_flags already exists in the script; this only allows the user to add to it.

Can you fix the PR description.

Fixed!

I'm not sure about this change either. Listing the files as done now seems good enough to me, and the changes proposed here mostly seem to complicate things.

Understood, if others feel this is unneeded, I can close. I do feel this adds useful functionality for this script, so users don't have to manually remove files if they don't want one deleted.

@fanquake

Copy link
Copy Markdown
Member

Lets close this for now. Can always return in future.

@fanquake fanquake closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants