-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[do design for] garbage collection in a floxy way. #1054
Comments
In the docs we might want to do a bit of work to explain what GC actually prunes - i.e., if there is an existing Ideally users would have a way to "list all of the environments on this machine that are taking up space in the store" - basically an alias to |
related issue https://github.com/flox/product/issues/471 |
detecting these overlaps with #934 |
Regarding design, I think it goes like this:
The output would look like this:
then when the garbage collection is actually done we'll get rid of the spinner and show how much space was freed:
Docs
Questions
|
they do, links to the wrapped managed env are added there during construction of those envs.
the symlink name does not include the environment name nix's garbage collection does currently not allow the removal of specific gc-roots at least last time i did this there were issues with doing this granularly. I think we could come up with something more precise in pkgdb that a bit more targeted |
side question: do you have any ideas for automatically triggering this functionality. could that be async? |
some thoughts:
|
Just a note: this may also delete nixpkgs source trees which we have to re-download for pkgdb operations. If so it probably means we're doing an eval somewhere we don't need to. |
Yeah, Tom pointed out a couple of options, but I would make this configurable. For instance, If you make it configurable you either need to make it something that we trigger, or in order to set it you would have the Instead I would do this:
Something that falls out of the above is we probably want a flag to only delete the stale environments instead of running the full GC. That will be useful in the |
That would also do flox gc, right? |
Yes, updated the comment. I think for a first pass we can just do the manual GC command in one ticket followed by a ticket for auto-gc as an enhancement whenever we prioritize it. |
🚢 |
can this be amended to exclude current revision of any remote environments (just clean up older versions but not my default env that I activate with
Agree, we should take this and other enhancements proposed to issues once we have the first one. There's other things in this thread we can do to make the experience really nice. we can create those enhancements once we have the base implementation in our hands and review this full issue before closing |
This might be scope for a different issue entirely, but it might also be nice to delete the gcroots for stale/previous managed env generations automatically without requiring the user to run |
@zmitchell please add link. |
The design is at the bottom of the description for the environment registry ticket: #1287 |
Describe the feature:
We need a way for users to prune stuff in the nix store that isn't "Invoke this nix thing". We need a way that feels native to flox.
In an ideal world, we probably have a manual command to be run for immediate cleanup and something that does stuff periodically so that disk space isn't completely eaten.
Describe a use case of this feature:
As a user,
I want to not have a full disk because of flox
so that I can use my computer to do other stuff.
rm -rf .flox
for managed environments leaves orphans that don't get garbage collectedAcceptance criteria:
The text was updated successfully, but these errors were encountered: