How can I safely remove packages installed with stack-2.x?

12 views
Skip to first unread message

Alexis King

unread,
Sep 12, 2019, 2:04:47 AM9/12/19
to haskel...@googlegroups.com
Hello,

I am wondering what the proper procedure is to safely remove an installed package on recent versions of stack. I’d like to do this for two reasons:

  1. Sometimes I’d like to clean out old packages for old snapshots I no longer care about.

  2. I am currently trying to reproduce a bug in stack, and I think it may depend on package installation order. It’s very painful to have to blow everything away every time I want to try a different installation order.

On older versions of stack, I’d just delete the relevant subdirectories in the ~/.stack/snapshots directory, but (1) that’s harder to do now that those directories don’t have human-readable names and (2) it seems that deleting those directories leaves something somewhere in an invalid state (due to the source of truth being the pantry database?) that I do not know how to fix without blowing all of ~/.stack away and starting over.

Is there a way to do this? I’d very much like to reproduce the aforementioned bug, since I’ve hit it a couple times, and it’s a real showstopper.

Thanks,
Alexis

Reply all
Reply to author
Forward
0 new messages