Merged 'purge' command with 'clean' and deleted 'purge' (#4970)
* Merged 'purge' command with 'clean'. Deleted 'purge'. fixes #2942 'spack purge' has been merged with 'spack clean'. Documentation has been updated accordingly. The 'clean' and 'purge' behavior are not mutually exclusive, and they log brief information to tty while they go. * Fixed a wrong reference to spack clean in the docs * Added tests for 'spack clean'. Updated bash completion.
This commit is contained in:

committed by
becker33

parent
9e8cce41e3
commit
faeb1b77b2
@@ -126,8 +126,8 @@ When Spack builds a package, it creates a temporary directory within the
|
||||
|
||||
After a package is successfully installed, Spack deletes the temporary
|
||||
directory it used to build. Unsuccessful builds are not deleted, but you
|
||||
can manually purge them with :ref:`spack purge --stage
|
||||
<cmd-spack-purge>`.
|
||||
can manually purge them with :ref:`spack clean --stage
|
||||
<cmd-spack-clean>`.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -142,8 +142,8 @@ can manually purge them with :ref:`spack purge --stage
|
||||
|
||||
Location to cache downloaded tarballs and repositories. By default these
|
||||
are stored in ``$spack/var/spack/cache``. These are stored indefinitely
|
||||
by default. Can be purged with :ref:`spack purge --downloads
|
||||
<cmd-spack-purge>`.
|
||||
by default. Can be purged with :ref:`spack clean --downloads
|
||||
<cmd-spack-clean>`.
|
||||
|
||||
--------------------
|
||||
``misc_cache``
|
||||
@@ -151,7 +151,7 @@ by default. Can be purged with :ref:`spack purge --downloads
|
||||
|
||||
Temporary directory to store long-lived cache files, such as indices of
|
||||
packages available in repositories. Defaults to ``~/.spack/cache``. Can
|
||||
be purged with :ref:`spack purge --misc-cache <cmd-spack-purge>`.
|
||||
be purged with :ref:`spack clean --misc-cache <cmd-spack-clean>`.
|
||||
|
||||
--------------------
|
||||
``verify_ssl``
|
||||
|
@@ -237,7 +237,7 @@ as other Spack mirrors (so it can be copied anywhere and referenced with a URL
|
||||
like other mirrors). The mirror is maintained locally (within the Spack
|
||||
installation directory) at :file:`var/spack/cache/`. It is always enabled (and
|
||||
is always searched first when attempting to retrieve files for an installation)
|
||||
but can be cleared with :ref:`purge <cmd-spack-purge>`; the cache directory can also
|
||||
but can be cleared with :ref:`clean <cmd-spack-clean>`; the cache directory can also
|
||||
be deleted manually without issue.
|
||||
|
||||
Caching includes retrieved tarball archives and source control repositories, but
|
||||
|
@@ -3432,24 +3432,12 @@ Does this in one of two ways:
|
||||
``spack clean``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Cleans up temporary files for a particular package, by deleting the
|
||||
expanded/checked out source code *and* any downloaded archive. If
|
||||
``fetch``, ``stage``, or ``install`` are run again after this, Spack's
|
||||
build process will start from scratch.
|
||||
|
||||
.. _cmd-spack-purge:
|
||||
|
||||
^^^^^^^^^^^^^^^
|
||||
``spack purge``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Cleans up all of Spack's temporary and cached files. This can be used to
|
||||
recover disk space if temporary files from interrupted or failed installs
|
||||
accumulate in the staging area.
|
||||
|
||||
When called with ``--stage`` or without arguments this removes all staged
|
||||
files and will be equivalent to running ``spack clean`` for every package
|
||||
you have fetched or staged.
|
||||
files.
|
||||
|
||||
When called with ``--downloads`` this will clear all resources
|
||||
:ref:`cached <caching>` during installs.
|
||||
@@ -3459,6 +3447,11 @@ directory, including cached virtual indices.
|
||||
|
||||
To remove all of the above, the command can be called with ``--all``.
|
||||
|
||||
When called with positional arguments, cleans up temporary files only
|
||||
for a particular package. If ``fetch``, ``stage``, or ``install``
|
||||
are run again after this, Spack's build process will start from scratch.
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Keeping the stage directory on success
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -3472,7 +3465,7 @@ package has been successfully built and installed. Use
|
||||
$ spack install --keep-stage <spec>
|
||||
|
||||
This allows you to inspect the build directory and potentially debug
|
||||
the build. You can use ``purge`` or ``clean`` later to get rid of the
|
||||
the build. You can use ``clean`` later to get rid of the
|
||||
unwanted temporary files.
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
Reference in New Issue
Block a user