diff options
author | alalazo <massimiliano.culpo@googlemail.com> | 2016-04-04 10:59:01 +0200 |
---|---|---|
committer | alalazo <massimiliano.culpo@googlemail.com> | 2016-04-04 10:59:01 +0200 |
commit | f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb (patch) | |
tree | 2718ad002cdb08ac2430939f122625156f7cbb52 /lib/spack/docs/basic_usage.rst | |
parent | 401dcb363539409e7b94d8ce016bc1a2e70db3a1 (diff) | |
download | spack-f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb.tar.gz spack-f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb.tar.bz2 spack-f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb.tar.xz spack-f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb.zip |
uninstall : updated documentation and error messages
Diffstat (limited to 'lib/spack/docs/basic_usage.rst')
-rw-r--r-- | lib/spack/docs/basic_usage.rst | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index accf09cc2a..72a02802fb 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -149,26 +149,46 @@ customize an installation in :ref:`sec-specs`. ``spack uninstall`` ~~~~~~~~~~~~~~~~~~~~~ -To uninstall a package, type ``spack uninstall <package>``. This will -completely remove the directory in which the package was installed. +To uninstall a package, type ``spack uninstall <package>``. This will ask the user for +confirmation, and in case will completely remove the directory in which the package was installed. .. code-block:: sh spack uninstall mpich If there are still installed packages that depend on the package to be -uninstalled, spack will refuse to uninstall it. You can override this -behavior with ``spack uninstall -f <package>``, but you risk breaking -other installed packages. In general, it is safer to remove dependent -packages *before* removing their dependencies. +uninstalled, spack will refuse to uninstall it. -A line like ``spack uninstall mpich`` may be ambiguous, if multiple -``mpich`` configurations are installed. For example, if both +To uninstall a package and every package that depends on it, you may give the +`--dependents` option. + +.. code-block:: sh + + spack uninstall --dependents mpich + +will display a list of all the packages that depends on `mpich` and, upon confirmation, +will uninstall them in the right order. + +A line like + +.. code-block:: sh + + spack uninstall mpich + +may be ambiguous, if multiple ``mpich`` configurations are installed. For example, if both ``mpich@3.0.2`` and ``mpich@3.1`` are installed, ``mpich`` could refer to either one. Because it cannot determine which one to uninstall, -Spack will ask you to provide a version number to remove the -ambiguity. As an example, ``spack uninstall mpich@3.1`` is -unambiguous in this scenario. +Spack will ask you either to provide a version number to remove the +ambiguity or use the ``--all`` option to uninstall all of the matching packages. + +You may force uninstall a package with the `--force` option + +.. code-block:: sh + + spack uninstall --force mpich + +but you risk breaking other installed packages. In general, it is safer to remove dependent +packages *before* removing their dependencies or use the `--dependents` option. Seeing installed packages |