Downgrade
DETAILS: Tier: Free, Premium, Ultimate Offering: Self-managed
This section contains general information on how to revert to an earlier version of a package.
WARNING: It is required to revert the schema changes (migrations) made as part of the upgrade. You must therefore have at least a database backup created under the exact same version and edition you are downgrading to. Ideally, you should have a full backup archive on hand. Restoring the backup is required to revert the schema changes (migrations) made as part of the upgrade. The restore overwrites all newer GitLab database content with the older state.
The example below demonstrates the downgrade procedure when downgrading between minor and patch versions (for example, from 15.0.6 to 15.0.5).
When downgrading between major versions, you must take into account version-specific changes that occurred when you previously upgraded. For more information, see:
These steps consist of:
- Stopping GitLab
- Removing the current package
- Installing the old package
- Reconfiguring GitLab
- Restoring the backup
- Starting GitLab
Steps:
-
Stop GitLab and remove the current package:
# If running Puma sudo gitlab-ctl stop puma # Stop sidekiq sudo gitlab-ctl stop sidekiq # If on Ubuntu: remove the current package sudo dpkg -r gitlab-ee # If on Centos: remove the current package sudo yum remove gitlab-ee
-
Identify the GitLab version you want to downgrade to:
# (Replace with gitlab-ce if you have GitLab FOSS installed) # Ubuntu sudo apt-cache madison gitlab-ee # CentOS: sudo yum --showduplicates list gitlab-ee
-
Downgrade GitLab to the desired version (for example, to GitLab 15.0.5):
# (Replace with gitlab-ce if you have GitLab FOSS installed) # Ubuntu sudo apt install gitlab-ee=15.0.5-ee.0 # CentOS: sudo yum install gitlab-ee-15.0.5-ee.0.el8
-
Reconfigure GitLab:
sudo gitlab-ctl reconfigure
-
Restore GitLab to complete the downgrade.