How to update GitLab CE on Ubuntu

Boban Miksin Categories: Tips and tricks, IT administration Date 01-Sep-2016
How To Update Gitlab CE On Ubuntu

Table of contents

    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 | 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.


    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


    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

    Boban Miksin CTO

    Boban is a craftsman with more than ten years of dedicated service to the development and management of new software.