<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 6, 2017 at 10:00 AM, Sven Panne <span dir="ltr"><<a href="mailto:svenpanne@gmail.com" target="_blank">svenpanne@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-02-04 19:19 GMT+01:00 Geraldus <span dir="ltr"><<a href="mailto:heraldhoi@gmail.com" target="_blank">heraldhoi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="box-sizing:border-box;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px;margin-top:0px">I want to perform some cleanup deleting obsolete compilers located in<span class="m_2569520822957129323m_5522771072483928938inbox-inbox-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px">~/.stack</code><span class="m_2569520822957129323m_5522771072483928938inbox-inbox-Apple-converted-space"> </span>folder. I know stack places them into<span class="m_2569520822957129323m_5522771072483928938inbox-inbox-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px">~/.stack/programs/<platfo<wbr>rm>/</code><span class="m_2569520822957129323m_5522771072483928938inbox-inbox-Apple-converted-space"> </span>directory, however I think there are also should be something else related, e.g. docs and libs, and especially packages that was built when I used old LTS snapshots. [...]<br></p></div></blockquote><div>It's good to hear that I'm not alone with such an obvious(?) undocumented use case... :-) I often want to say something like "Nuke away everything related to nightly-X-Y-Z" (garbage-collecting away any GHC on the way, too) or "Nuke GHC X.Y and all related snapshots". The last time I looked at stack's documentation, I couldn't figure out how to do that, so from time to time I completely remove ~/.stack, but that can't be the recommended way to do this. ~/.stack gets *huge* after some time, so some easy administrative interface for it would be nice.</div></div></div></div>
<br></blockquote><div><br></div><div><br></div><div>Personally, I have always just wiped out the entire ~/.stack directory when it gets too big, I just don't have the patience to individually deal with each snapshot directory. If you just want to get rid of the compiled libraries, you can nuke ~/.stack/snapshots instead, but personally I've found it convenient to get rid of my install GHCs occasionally because I usually don't need them all anymore (e.g. I don't need GHC 7.10.2 or 7.8.4 for any code I've been working on in the past few months).</div><div><br></div><div>Could there be a nice `gc` command to more intelligently delete stuff that hasn't been used recently? Probably, but I don't think the demand has been very high for it: people seem to either not care about disk space much, or don't mind the occasionally tactical nuke.</div><div><br></div><div>(FWIW: I would also periodically nuke my ~/.cabal and ~/.ghc directories in the past.)</div><div><br></div><div>Michael</div></div></div></div>