frum icon indicating copy to clipboard operation
frum copied to clipboard

Add frum clean command

Open citizen428 opened this issue 3 years ago • 7 comments

This PR adds a frum clean command for removing old downloads from the temporary installation directory (default: ~/.frum/versions/.downloads). This removed ~3GB of old downloads for me. It's also one of the steps mentioned in #78.

changelog:

  • Add frum clean command

citizen428 avatar Jun 03 '21 08:06 citizen428

This fails because I forgot to update the shell completions, will do that later today.

Edit: updating the completions is sort of the hardest part of contributing to this project. There's a lot of trailing whitespace and if that gets accidentally removed (i.e. by editors automatically fixing it) the failed test run shows no proper diff.

citizen428 avatar Jun 03 '21 09:06 citizen428

@citizen428

I was expecting that frum install don't leave any old downloads. In fact, I didn't find any old downloads under ~/.frum/versions/.downloads after installing Ruby 2.6.5 and 2.7.0. What did you find under the directory specifically? And If frum install leaves old downloads, I think we should modify install command in order not to do so.

https://user-images.githubusercontent.com/41065217/120660665-8476a680-c4c2-11eb-8c3d-815e9ccb44ac.mov

TaKO8Ki avatar Jun 03 '21 14:06 TaKO8Ki

@TaKO8Ki I found about 12 temp directories totaling about 3 GB. Sure, that's probably because I sometimes started installs that I manually canceled (mostly when developing and trying out stuff) but there is any number of reasons a build could fail and not clean up after itself.

The real reason I added this though is that we discussed it as part of #78, i.e. to implement --configure-help we may want to be able to fetch, maybe build from the same source repeatedly and then manually remove.

Plus, we could potentially extend this to something like frum clean --implode or similar which becomes a complete uninstall command, removing all installed Ruby versions and potentially frum itself.

LMK what you think.

citizen428 avatar Jun 04 '21 00:06 citizen428

It's been almost two months now, any idea what we're gonna do with this PR @TaKO8Ki?

citizen428 avatar Aug 03 '21 11:08 citizen428

@citizen428 Sorry for the late reply. Implementing clean command sounds good. Can I have more time to consider how to implement it in detail?

TaKO8Ki avatar Aug 03 '21 15:08 TaKO8Ki

@TaKO8Ki Feel free to just close this if we're not going to merge it 😃

citizen428 avatar Dec 27 '21 06:12 citizen428

@citizen428 @TaKO8Ki this should be implemented. It's a very useful command to have for those of us with small drives and not a lot of free space.

blakeperdue avatar Sep 17 '22 03:09 blakeperdue

@blakeperdue I can't merge it myself and it seems that this is no longer actively worked on, so I'll close my PR.

citizen428 avatar Apr 17 '23 03:04 citizen428