summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-06-03 16:30:12 +0200
committerGitHub <noreply@github.com>2020-06-03 16:30:12 +0200
commit70c3b0ba09414501eee14bdce64ca70f4157985b (patch)
tree99ab85c5ae2cf3e80f2ed997ce9cb704c7016010 /lib
parent600e2cfc4f0ffa2000376064c11651e12432f973 (diff)
downloadspack-70c3b0ba09414501eee14bdce64ca70f4157985b.tar.gz
spack-70c3b0ba09414501eee14bdce64ca70f4157985b.tar.bz2
spack-70c3b0ba09414501eee14bdce64ca70f4157985b.tar.xz
spack-70c3b0ba09414501eee14bdce64ca70f4157985b.zip
spack uninstall: improve help message (#16886)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/uninstall.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index f03270d06d..cec71c6749 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -26,7 +26,7 @@ level = "short"
error_message = """You can either:
a) use a more specific spec, or
- b) specify the package by its hash (e.g. `spack uninstall /hash`), or
+ b) specify the spec by its hash (e.g. `spack uninstall /hash`), or
c) use `spack uninstall --all` to uninstall ALL matching specs.
"""
@@ -40,6 +40,18 @@ display_args = {
def setup_parser(subparser):
+ epilog_msg = ("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`."
+ "\n\nWhen 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.")
+ subparser.epilog = epilog_msg
subparser.add_argument(
'-f', '--force', action='store_true', dest='force',
help="remove regardless of whether other packages or environments "
@@ -48,12 +60,8 @@ def setup_parser(subparser):
subparser, ['recurse_dependents', 'yes_to_all', 'installed_specs'])
subparser.add_argument(
'-a', '--all', action='store_true', dest='all',
- help="USE CAREFULLY. Remove ALL installed packages that match each "
- "supplied spec. i.e., if you `uninstall --all libelf`,"
- " ALL versions of `libelf` are uninstalled. If no spec is "
- "supplied, all installed packages will be uninstalled. "
- "If used in an environment, all packages in the environment "
- "will be uninstalled.")
+ help="remove ALL installed packages that match each supplied spec"
+ )
def find_matching_specs(env, specs, allow_multiple_matches=False, force=False):