-
Notifications
You must be signed in to change notification settings - Fork 841
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
Snapshot cross sharing and cleanup #1847
Comments
One of the errors that I saw goes like this:
|
It would be great to implement something like #133, particularly if it's able to remove snapshots based on which ones were recently used / based on interactive user selection. We're hoping to implement #1265 and related issues soon, and being able to free up storage occupied by old snapshots is required for doing that.
The best way to do this right now is to delete all the snapshots that use the same GHC version. The other snapshots are guaranteed to not have sharing if the GHC version differs.
I don't recall whether installed packages are relocatable or not. Even if they are, we cannot use hardlinks on windows. #133 is still feasible even if installed packages are not relocatable. We just need to leave them where they are, and delete everything that isn't shared with other snapshots. |
Except that it will let the directories live (potentially forever) even after we have deleted the old snapshots. |
I don't know of any good ways to clean up the snapshots to free space. So I just
rm -rf
d the snapshot directories for some snapshots. But that played havoc as I started seeing strange errors even for the remaining snapshots. I had to use ghc-pkg check/unregister for the errors to go away. I guess that might be due to cross sharing of packages across snapshots.I have two questions:
I found stack rm command #133 for cleanup but that's not yet implemented. Until some cleanup command is implemented what is the recommended way to cleanup snapshots and reclaim space?
I don't know how the cross sharing works but is it possible to make every snapshot self contained so that removal of one does not affect the other? If the sharing is file level then hard linking should be sufficient. What are the issues involved in making snapshots self contained?
The text was updated successfully, but these errors were encountered: