Skip to content

uninstall and install.sh: remove only miso's own files - #24

Merged
dmjio merged 1 commit into
mainfrom
remove-only-miso-files
Oct 22, 2026
Merged

dmjio merged 1 commit into
mainfrom
remove-only-miso-files

Conversation

@dmjio

@dmjio dmjio commented Oct 22, 2026

Copy link
Copy Markdown
Member

miso uninstall deleted the whole folder two levels above the binary whenever it contained a bin/miso. If miso was installed as /usr/local/bin/miso (with /usr/local/mhs-*), uninstall deleted all of /usr/local.

install.sh deleted $MISO_HOME/bin as a whole, so MISO_HOME=$HOME deleted ~/bin and every program in it. It listed them first, but --yes, and installs without a terminal (curl … | sh in CI), don't ask.

Now both remove only what miso put there: bin/miso, bin/cpphs (and .exe), the package databases mhs-VERSION/, and in $MISO_HOME the caches (mcabal/, src/, store/, rts/).

  • A folder that holds nothing else is removed along with them, as before.
  • A folder that holds other things keeps everything that isn't miso's. The caches' generic names (src/, store/) are left there too, since they may not be miso's.

Checked with the built tool and a local release:

Layout Before After
/usr/local-like folder with bin/node, share/, src/ whole folder deleted only bin/miso, bin/cpphs, mhs-* removed
~/.miso all removed all removed, folder too
MISO_HOME with the user's own src/ and bin/mytool — user's files kept
MISO_HOME=$HOME refused refused (unchanged)
install.sh --yes with MISO_HOME=$HOME ~/bin/mytool deleted kept

Generated by Claude Code

miso uninstall removed the whole folder two levels above the binary when
it held a bin/miso.  Installed as /usr/local/bin/miso (with
/usr/local/mhs-*), it removed all of /usr/local.  install.sh removed
$MISO_HOME/bin as a whole, so MISO_HOME=$HOME removed ~/bin and every
program in it; it listed them first, but --yes, and an install without a
terminal, did not ask.

Both now remove only what miso put there: bin/miso and bin/cpphs (and
.exe), the package databases mhs-VERSION/, and in $MISO_HOME the caches
(mcabal/, src/, store/, rts/).  A folder that holds nothing else is
removed with them, as before.  In a folder that holds other things, only
miso's files go; the caches' generic names are left there, as they may
not be miso's.

Checked by hand with the built tool and a local release:
- a /usr/local-like folder: before, all of it was removed; now bin/miso,
  bin/cpphs and mhs-* go, and bin/node, share/ and src/ stay
- ~/.miso: everything goes, and the folder too (as before)
- MISO_HOME with the user's own src/: their src/ and bin/mytool stay
- install.sh with MISO_HOME=$HOME: before, ~/bin/mytool was removed;
  now it stays
@dmjio
dmjio merged commit 4e590eb into main Oct 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant