Upgrade 12.9.2 to 13

I’m looking to upgrade my 12.9.2 CE install to the latest version (13.4.4?) but apparently a simple “sudo apt-get dist-upgrade” doesn’t seem to do the trick. How should I go to work?

Should I change “https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/” to “foss” in gitlab_gitlab-ce.list.distUpgrade and rerun apt-get?

This is my gitlab_gitlab-ce.list file btw:

# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/gitlab/gitlab-ce

# deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main # disabled on upgrade to focal
# deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main # disabled on upgrade to focal

follow the instructions here; # https://docs.gitlab.com/omnibus/update/

seems to me that you missed the sudo apt-get update. - to have the updated packages available.

If your using Debian/Ubuntu this should work:
sudo apt-get update
sudo apt-get install gitlab-ce

You might be interested in my experience as had similar issue:

and also my posts in reply to someone else as we both had the issue you are experiencing:

please do not attempt to upgrade from 12.9.2 to 13.4 without following correct upgrade procedures because in 12.10.x there is a postgresql upgrade from postgres 10 to postgres 11. If you try and go direct to 13.4 you will most likely break your installation.

1 Like

Sure I got that though (update).

1 Like

Looks like I’m best off with this path: 12.9.2 -> 12.10.14 -> 13.0.14 -> 13.4.3

I will give that a go.

Currently running into the following errors:

sudo apt-get install gitlab-ce=12.10.4-ce.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '12.10.4-ce.0' for 'gitlab-ce' was not found

And:

Hit:5 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu focal InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  gitlab-ce
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/840 MB of archives.
After this operation, 172 MB of additional disk space will be used.
(Reading database ... 169617 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_13.5.1-ce.0_amd64.deb ...
gitlab preinstall: It seems you are upgrading from major version 12 to major version 13.
gitlab preinstall: It is required to upgrade to the latest 13.0.x version first before proceeding.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_13.5.1-ce.0_amd64.deb (--unpack):
 new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/gitlab-ce_13.5.1-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What should I do?

Hmm, well first, you need to upgrade to a 13.0.0 release first from 12.x as per the error message.

Second, 12.10.x doesn’t exist for Focal. Last 12.x release is Bionic. So you would need to use the 18.04 package and upgrade to latest 12.x release, and then look at changing to focal after this.

You concluded youself that you needed to go with 12.10.14
and now you’re complaining abut problems with 12.10.4, did you make a typo?

(I only checked -ee, but 12.10.4 indeed doesn’t exist, .3 and .5 does not, I guess there was some screwup in 12.10.4, that meant they never released it, but it really shouldn’t cause you problems)

So basically I have to download the .deb file and upgrade by hand instead of via apt?

Yes it was a typo, but .14 also gave this result:

sudo apt-get install gitlab-ce=12.10.14-ce.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '12.10.14-ce.0' for 'gitlab-ce' was not found

@vespino You are on Ubuntu Focal - no 12.x package exists.

Edit /etc/apt/sources.list.d/gitlab_ce.list or whatever it’s name is, and change focal to bionic. Then install the 12.x. version that you want. 13.x and higher only exists for Focal.

So, edit file.
apt-get update
apt-get install gitlab-ce=12.10.14-ce.0

Once you are on this, and want to then go to 13.x, edit file again, change bionic to focal, and repeat for 13.x versions.

I have managed to update my install from 12.9.2 to 12.10.14 by downloading the .deb file and installing it by hand. I will now check if all’s running well and if yes, first try to apt-get upgrade to the latest version and if this fails, I will first upgrade manually to 13.0.14 and then try apt-get upgrade again.

Edit: had to manually upgrade to 13.0.14 after which apt-get upgrade did the trick to move to 13.5.1.