Skip to content

Commit

Permalink
Add documentation for conan cache clean (#3145)
Browse files Browse the repository at this point in the history
* Add documentation for conan cache clean

* Address review comments
  • Loading branch information
AbrilRBS authored Apr 3, 2023
1 parent d579dcc commit 3447559
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions reference/commands/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ conan cache clean
.. code-block:: text
$ conan cache clean -h
usage: conan cache clean [-h] [-v [V]] [-s] [-b] [-d]
[-p PACKAGE_QUERY]
pattern
usage: conan cache clean [-h] [-v [V]] [-s] [-b] [-d] [-t] [-p PACKAGE_QUERY]
[pattern]
Remove non-critical folders from the cache, like source, build and/or download
(.tgz store) ones.
Expand All @@ -174,14 +173,50 @@ conan cache clean
verbose to more verbose: -vquiet, -verror, -vwarning,
-vnotice, -vstatus, -v or -vverbose, -vv or -vdebug,
-vvv or -vtrace
-s, --source Clean source folders
-b, --build Clean build folders
-d, --download Clean download folders
-t, --temp Clean temporary folders
-p PACKAGE_QUERY, --package-query PACKAGE_QUERY
Remove only the packages matching a specific query,
e.g., os=Windows AND (arch=x86 OR compiler=gcc)
This command will remove all temporary folders, along with the source, build and download folder
that Conan generates in its execution. It will do so for every matching reference passed in *pattern*,
unless a specific flag is supplied, in which case only the specified folders will be removed.


**Examples**:


- Remove all non-critical files:

.. code-block:: text
$ conan cache clean "*"
- Remove all temporary files:

.. code-block:: text
$ conan cache clean "*" --temp
- Remove the download folders for the ``zlib`` recipe:

.. code-block:: text
$ conan cache clean "zlib*" --download
- Remove everything but the download folder for the ``zlib`` recipe:

.. code-block:: text
$ conan cache clean "*" --source --build --temp
conan cache check-integrity
---------------------------

Expand Down

0 comments on commit 3447559

Please sign in to comment.