Spack: Want to uninstall packages by hash

Created on 17 Jan 2016  路  3Comments  路  Source: spack/spack

I have to versions of cmake installed, the second coming from an updated package file. I want to uninstall the older one:

$ spack uninstall cmake
==> Error: cmake matches multiple packages:

-- linux-x86_64 / [email protected] ---------------------------
wrfjvfv [email protected]  enajeal [email protected]+ncurses

You can either:
  a) Use a more specific spec, or
  b) use spack uninstall -a to uninstall ALL matching specs.

I want to be able to say spack uninstall cmake@wrfjvfv or something similar.

Most helpful comment

Yes, this is annoying :smile:.

We're introducing a new sigil, /, in #360. See 7989a7f903da149d81f8e6370a9ef8a4f64c45a8.

Once that is merged, you should be able to refer to specific specs by hash only (the hash is globally unique). And you should be able to do things like build against a very specific dep tree, e.g.:

    spack install foo ^/cfb312

Removing by hash would be simpler:

    spack uninstall /cfb312

In the meantime the easiest thing would be to find the directory and rm -rf it, then run spack reindex to flush it from the DB cache.

All 3 comments

Yes, this is annoying :smile:.

We're introducing a new sigil, /, in #360. See 7989a7f903da149d81f8e6370a9ef8a4f64c45a8.

Once that is merged, you should be able to refer to specific specs by hash only (the hash is globally unique). And you should be able to do things like build against a very specific dep tree, e.g.:

    spack install foo ^/cfb312

Removing by hash would be simpler:

    spack uninstall /cfb312

In the meantime the easiest thing would be to find the directory and rm -rf it, then run spack reindex to flush it from the DB cache.

Yes, I used rm -rf... but this doesn't tell me which other packages depend on the one just deleted, leaving broken packages around.

Can confirm that uninstalling by hash works now. This issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Joseguz101 picture Joseguz101  路  3Comments

jychoi-hpc picture jychoi-hpc  路  3Comments

adamjstewart picture adamjstewart  路  3Comments

citibeth picture citibeth  路  3Comments

gweodoo picture gweodoo  路  3Comments