Install Liquibase with SDKMAN

You can install Liquibase using the SDKMAN package manager by following the steps on this page.

Prerequisites

  1. Ensure you have the necessary permissions (such as administrator rights) to install, upgrade, or remove software on your system.
  2. Install SDKMAN on your machine.

Install Liquibase Version

Latest stable version

To install the latest version of Liquibase, run the following command:

sdk install liquibase

When successful, SDKMAN sets the latest version as the default and generates output like this:

sdk install liquibase

Downloading: liquibase 4.26.0

In progress...

####################################################################################################################################################################### 100.0%

Installing: liquibase 4.26.0
Done installing!

Setting liquibase 4.26.0 as default.

Specific version

To install a specific version of Liquibase, run the following command:

sdk install liquibase 4.26.0

Local version

If you use a snapshot version or already have a local installation, set up a new local version by specifying the path to the local installation:

sdk install groovy liquibase-4.25.0 /path/to/liquibase-4.25.0

Note that the local version name (liquibase-4.25.0 in the example above) must be a unique name that is not already in the list of available version names.

When you use SDKMAN to install Liquibase, it may overwrite your LIQUIBASE_HOME environment variable, even if you have one defined in, for instance, your ~/.zshrc file.

Remove Liquibase Version

To remove an specific installed version of Liquibase, run the following command:

sdk uninstall liquibase 4.26.0

Note: Removing a local version will not remove the local installation.

Check Version Information

List Versions

To see a list of candidate versions you can use:

sdk list liquibase

This results in a list view showing the available, local, installed, and current versions of Liquibase.

Current Version(s)

To see what is currently in use for a candidate:

sdk current liquibase

SDKMAN displays the following output:

Using liquibase version 4.26.0

Check for Out of Date Version(s)

To see what is currently out of date for a candidate on your system:

sdk upgrade liquibase

SDKMAN displays a list of out of date versions.

Switch Version

Use Version

Choose to use a given version in the current terminal:

sdk use liquibase 4.26.0

Note: This switches the candidate version for the current shell only. To make this change permanent, use the default command instead.

Set Default Version

Chose to make a given version the default:

sdk default liquibase 4.26.0

This ensures that all subsequent shells start with version 4.26.0.

Related Links