The tag-exists command checks whether the tag you specify already exists in your database.


The tag-exists command is typically used to identify whether the specified tag exists in the database or specifically in the DATABASECHANGELOG table. Running the tag-exists command checks for the tag and, based on whether it exists or not, provides the appropriate output.

Running the tag-exists command

To run the tag-exists command, specify the driver, classpath, and URL in the Liquibase properties file. For more information, see Specifying Properties in a Connection Profile. You can also specify these properties in your command line.

Then run the tag-exists command:

liquibase --changelog-file=communityOnly.xml tag-exists --tag myTag

Note: Enter the name of the changelog and the tag that you want to use in place of communityOnly.xml and myTag.

tag-exists global attributes

Tip: For best results, specify all commands and parameters with the --kebab-case format in the CLI. If your preference is camelCase, it will still work in the CLI.

Attribute Definition Requirement

The root changelog


The JDBC database connection URL


The database username


The database password


Note: The username and password attributes are not required for connections and systems which use alternate means of authentication.

tag-exists command attributes

Attribute Definition Requirement

The tag identifying which tagged changesets in the changelog to evaluate.