Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about using --package-query to remove only specific packages #3157

Merged
merged 2 commits into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion reference/commands/remove.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,18 @@ pattern including the ``:`` separator of the ``package_id``:
# in normal situations


All the above commands, by default operate in the Conan cache.
Note that you can filter which packages will be removed using the ``--package-query`` argument:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we fully document package query syntax somewhere and provide a link here?
like operators (AND, NOT, OR, XOR, =, !=, etc.), patterns (can I use build_type=Rel*?)
also, it's a bit unclear, if it can filter only by settings, but not by options?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Thanks for the suggestion :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've clarified that both settings and options work, and will work on adding a syntax reference in another PR


.. code-block:: text

$ conan remove zlib/1.2.11:* -p compiler=clang
# Removes all the zlib/1.2.11 packages built with Clang compiler


You can query packages by both their settings and options, including custom ones.


All the above commands, by default, operate in the Conan cache.
To remove artifacts from a server, use the ``-r=myremote`` argument:

.. code-block:: text
Expand Down