From df586158ad6360dfe7d792785ab62c5efb0c5db3 Mon Sep 17 00:00:00 2001 From: czoido Date: Mon, 3 Apr 2023 12:19:10 +0200 Subject: [PATCH] add docs --- reference/commands/remove.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reference/commands/remove.rst b/reference/commands/remove.rst index 95dd1c5c41c1..b6de76aa433f 100644 --- a/reference/commands/remove.rst +++ b/reference/commands/remove.rst @@ -36,7 +36,9 @@ conan remove The ``conan remove`` command removes recipes and packages from the local cache or from a specified remote. Depending on the patterns specified as argument, it is possible to -remove a complete package, or just remove the binaries, leaving still the recipe available. +remove a complete package, or just remove the binaries, leaving still the recipe +available. You can also use the keyword ``!latest`` in the revision part of the pattern to +avoid removing the latest recipe or package revision of a certain Conan package. To remove recipes and their associated package binaries from the local cache: @@ -56,6 +58,10 @@ To remove recipes and their associated package binaries from the local cache: # Remove zlib/1.2.11, only its latest recipe revision and binaries of that revision # Leave the other zlib/1.2.11 revisions intact + $ conan remove zlib/1.2.11#!latest + # Remove all the recipe revisions from zlib/1.2.11 but the latest one + # Leave the latest zlib/1.2.11 revision intact + $ conan remove zlib/1.2.11# # Remove zlib/1.2.11, only its exact and binaries of that revision # Leave the other zlib/1.2.11 revisions intact @@ -75,6 +81,9 @@ pattern including the ``:`` separator of the ``package_id``: $ conan remove zlib/1.2.11#latest:* # Removes all the zlib/1.2.11 package binaries only from the latest zlib/1.2.11 recipe revision + $ conan remove zlib/1.2.11#!latest:* + # Removes all the zlib/1.2.11 package binaries from all the recipe revisions but the latest one + $ conan remove zlib/1.2.11: # Removes the package binary from all the zlib/1.2.11 recipe revisions