drop-all

Last published July 28, 2025

drop-all drops all database objects owned by the user. drop-all will not drop functions, procedures, or packages for Liquibase Open Source. Functions, procedures, packages, and synonyms can only be dropped for Liquibase Pro supported objects.

Uses

drop-all is typically used when there is a need to prepare an environment schema to be identical to another environment schema. drop-all is useful in the developer and test environments to remove unwanted objects to reset the database to "empty".

The command makes it easier to standardize another schema, compared to manually deleting the objects, or dropping and recreating the desired schema.

drop-all should not be used in a production environment to prevent removal of required objects.

Syntax

To run the drop-all command, specify the driver, classpath, and URL in the Liquibase properties file. You can also specify these properties in your command line.

Then run the drop-all command:

liquibase drop-all

If you use Liquibase 4.27.0 and later, it is a best practice to specify liquibase.command.dropAll.requireForce or LIQUIBASE_COMMAND_DROP_ALL_REQUIRE_FORCE in your liquibase.properties file or as an environment variable. This makes it mandatory for developers to specify --force whenever they run drop-all in the CLI:

liquibase drop-all --force

Impact

Using the drop-all command comes with risks of unintended consequences. Because of this, in Liquibase 4.27.0 and later, the command lets you use --require-force to require developers to specify a --force flag to indicate that they intend to run it.

Warning: Look for potential unintended consequences before using this command.

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication. Also, you can specify database credentials as part of the url attribute.

Command parameters

Attribute

Definition

Requirement

--force=<true|false>

A required parameter which indicates you intend to use this feature. If you specify --force or --force=true, the command executes. If you omit the parameter or specify --force=false, the command does not execute. Default: false.

Liquibase 4.27.0+ only. If you use an earlier version, this flag is optional.

Note: In Liquibase 4.27.0 and later, if you specify --drop-all-require-force to false, then setting --force to false does not prevent --drop-all from executing.

Required

--url=<string>

The JDBC database connection URL.

Required

--default-catalog-name=<string>

Name of the default catalog to use for the database connection

Optional

--default-schema-name=<string>

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

--driver=<string>

The JDBC driver class

Optional

--driver-properties-file=<string>

The JDBC driver properties file

Optional

--drop-dbclhistory=<true|false>

Liquibase 4.27.0+. If true, Liquibase drops the DATABASECHANGELOGHISTORY table along with other database objects owned by the user. Default: false.

Optional

--password=<string>

Password to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

--require-force=<true|false>

Specifies whether Liquibase requires the user to specify the --force parameter to use the drop-all command. Liquibase 4.27.0+. Default: false.

Optional

--schemas=<string>

Schemas to include in drop. You can drop multiple schemas using a comma-separated list.

Optional

--username=<string>

Username to connect to the target database.

Tip: It is a best practice to store sensitive data in a Secrets Management tool with Liquibase Pro.

Optional

Output

When successful, the drop-all command produces the following output:

Liquibase Pro 3.9.0 licensed to Liquibase Pro Customer until Tue Sep 22 19:00:00 CDT 2020 All objects dropped from MVN_UAT@jdbc:oracle:thin:@support.datical.net:1521:ORCL Liquibase command 'drop-all' was executed successfully.

Output in Liquibase 4.27.0 and later

Value of --require-force

Value of --force

Command executes?

Output message

true

true

Yes

Standard success message

true

false or not specified

No

ERROR: The drop-all command may result in unrecoverable destructive changes to objects at <jdbc connection info>. This message can be suppressed and the drop-all executed by adding the --force flag.

false or not specified

true

Yes

Standard success message

false or not specified

false or not specified

Yes

Standard success message as well as the following message: INFO: The drop-all command may result in unrecoverable destructive changes to objects at <jdbc connection info>. To protect against unwanted drops, set 'LIQUIBASE_COMMAND_DROPALL_REQUIRE_FORCE=true' which will require a --force=true flag on the command. Learn more at https://docs.liquibase.com/dropall

drop-all - Liquibase