Menu Menu
How to update GitLab CE on Ubuntu

How to update GitLab CE on Ubuntu

Assuming you already have a GitLab CE as Omnibus package installed on your Ubuntu box, you may follow the next steps in order to upgrade your GitLab instance to the latest version.

Execute the following commands from your favorite shell:

    sudo apt-get update
    sudo apt-get upgrade
    sudo curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
    sudo apt-get install gitlab-ce

The last command might take a while to complete. Be aware that the progress will remain on 0% the whole time, but it will complete eventually, don't break it, if the command fails for any reason, visit the Troubleshooting section below.

Please note that the apt-get upgrade command is optional. It is up to you to decide whether you wish to upgrade all the updated packages or not.

Troubleshooting

In case the installation of the gitlab-ce package fails, you may execute the following commands, after which you can try to install the package again:

sudo apt-get clean
    sudo rm -rf /var/cache/apt/*
    sudo rm -rf /var/lib/apt/lists/*
    sudo rm -rf /var/lib/apt/lists/partial/*
    sudo apt-get update

Backup

After successful installation, you normally want to check if the backup procedure still works. Test it by running the following command:

/usr/bin/gitlab-rake gitlab:backup:create

In case you are backing up the configuration also, run that part of backup procedure as well. The location of the configuration backup and file name may vary. Here's our example:

/bin/tar -czf /media/backup-server/config/gitlab_config_backup.tar.gz /etc/gitlab

Latest blog posts
ITkonekt 2019 Overview
Front-End Day 2019: Our Impressions
Workshop with Uncle Bob
International Umbraco Conference in Novi Sad: Umbraco Roadshow 2019
How To Send an Email with Attachments Using EPiServer Forms