Skip to content

spack uninstall: improve help message#16886

Merged
alalazo merged 2 commits intospack:developfrom
alalazo:features/uninstall_help_message
Jun 3, 2020
Merged

spack uninstall: improve help message#16886
alalazo merged 2 commits intospack:developfrom
alalazo:features/uninstall_help_message

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Jun 1, 2020

fixes #12527

  • Mention that specs can be uninstalled by hash also in the help message
  • Reference spack gc in case people are looking for ways to clean the store from build time dependencies.
  • Use "spec" instead of "package" to avoid ambiguity in the error message.

The result is the following:

$ spack uninstall -h
usage: spack uninstall [-hfRya] ...

remove installed packages

positional arguments:
  installed_specs   one or more installed package specs

optional arguments:
  -h, --help        show this help message and exit
  -f, --force       remove regardless of whether other packages or environments depend on this one
  -R, --dependents  also uninstall any packages that depend on the ones given via command line
  -y, --yes-to-all  assume "yes" is the answer to every confirmation request
  -a, --all         remove ALL installed packages that match each supplied spec

Specs to be uninstalled are specified using the spec syntax (`spack help --spec`) and can be identified by their hashes. To remove packages that are needed only at build time and were not explicitly installed see `spack gc -h`.

When using the --all option ALL packages matching the supplied specs will be uninstalled. For instance, `spack uninstall --all libelf` uninstalls all the versions of `libelf` currently present in Spack's store. If no spec is supplied, all installed packages will be uninstalled. If used in an environment, all packages in the environment will be uninstalled.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Jun 1, 2020

@ejcjason @RobertRosca Following #16863 here's the other part of the request in #12527. Let me know if you think anything else is needed to help the user experience.

@alalazo alalazo requested review from becker33 and scheibelp June 2, 2020 09:09
alalazo added 2 commits June 3, 2020 15:52
fixes spack#12527

Mention that specs  can be uninstalled by hash also in
the help message. Reference `spack gc` in case people
are looking for ways to clean the store from build time
dependencies.

Use "spec" instead of "package" to avoid ambiguity in
the error message.
@alalazo alalazo force-pushed the features/uninstall_help_message branch from a58a55e to ea63312 Compare June 3, 2020 13:52
@alalazo alalazo merged commit 70c3b0b into spack:develop Jun 3, 2020
@alalazo alalazo deleted the features/uninstall_help_message branch June 3, 2020 14:30
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Jun 3, 2020

Thanks @adamjstewart

becker33 pushed a commit that referenced this pull request Jul 11, 2020
fixes #12527

Mention that specs  can be uninstalled by hash also in
the help message. Reference `spack gc` in case people
are looking for ways to clean the store from build time
dependencies.

Use "spec" instead of "package" to avoid ambiguity in
the error message.
vjranagit pushed a commit to vjranagit/spack that referenced this pull request Jan 18, 2026
fixes spack#12527

Mention that specs  can be uninstalled by hash also in
the help message. Reference `spack gc` in case people
are looking for ways to clean the store from build time
dependencies.

Use "spec" instead of "package" to avoid ambiguity in
the error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request to mention that you can uninstall package by hash

2 participants