Skip to main content
Version: current [25.0.x]

DROP TAG

Removes a tag from a Nessie source.

Syntax
DROP TAG [ IF EXISTS ] <tag_name>
{ AT COMMIT <commit_hash> | FORCE }
[ IN <source_name> ]

Parameters

[ IF EXISTS ] Optional

If you include this optional clause, the command succeeds regardless of whether the tag existed. If this clause is not specified, the command fails if the tag to be dropped does not exist.


<tag_name> String

The name of the tag that you are dropping.


AT COMMIT <commit_hash> | FORCE String

Use the AT COMMIT parameter when you want to specify the exact commit hash that the tag is expected to be at. This is helpful to prevent the tag from being dropped if it was modified unexpectedly. Commit hashes must be enclosed in double quotes (for example, “ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”).

Use the FORCE parameter when you want to drop the tag even if it has been changed.


IN <source_name> String   Optional

The name of the source containing the tag that you want to drop. If not specified, the current source in the query context is used.

Examples

Drop a tag at the specified commit
DROP TAG myTag
AT COMMIT "ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2"
Use the FORCE parameter to drop the specified tag
DROP TAG myTag
FORCE