== GitLab upgrade from Bullseye to Bookworm == {{{#!wiki important Note: apt is failing to resolve some dependencies right now, so aptitude is recommended (both for upgrading to latest in bullseye and from bullseye to bookworm upgrade). }}} For upgrading from bullseye-fasttrack to bookworm-fasttrack, make sure you update `gitlab-apt-pin-preferences` before you dist-upgrade. See [[DebianUpgrade]] for usual steps for upgrading between releases. Replace bullseye with bookworm in /etc/apt/sources.list or /etc/apt/sources.list.d/* and {{{ # apt update # apt install gitlab-apt-pin-preferences # aptitude dist-upgrade }}} {{{#!wiki important Note: ruby-grpc upgrade may cause some issues with error, dpkg: error processing archive /var/cache/apt/archives/libgrpc29_1.51.1-3+b1_amd64.deb (--unpack): trying to overwrite '/usr/share/grpc/roots.pem', which is also in package libgrpc22:amd64 1.44.0-2~fto11+1 Workaround: Remove libgrpc22 to allow the upgrade (until this is fixed by adding Breaks), dpkg -r --force-all libgrpc22 }}} If aptitude refuses to upgrade gitlab and insists on removing it instead, do the first Debian upgrade step using apt: {{{ # apt upgrade --without-new-pkgs }}} Then try installing gitlab manually using apt and see why it fails: {{{ # apt install gitlab ... The following packages have unmet dependencies: gitlab : Depends: ruby-nokogiri (>= 1.14.3~) but it is not going to be installed Depends: ruby-pg-query (>= 2.2.1~) but it is not going to be installed ... ruby-fog-aliyun : Depends: ruby-aliyun-sdk (>= 0.8.0) but it is not going to be installed }}} Install bpo12 versions of the offending dependency packages manually: {{{ # aptitude install ruby-nokogiri=1.14.3+dfsg-1~bpo12+1 ruby-pg-query=2.2.1-1~bpo12+1 ruby-aliyun-sdk=0.8.0-2~bpo12+1 # apt-mark auto ruby-nokogiri ruby-pg-query ruby-aliyun-sdk }}} And try installing gitlab again using apt. If apt stops complaining, complete the upgrade: {{{ # apt full-upgrade }}} === PostgreSQL upgrade === Bullseye provided PostgreSQL 13, but Bookworm comes with PostgreSQL 15. While you can keep using PostgreSQL 13 with GitLab, it is recommended to upgrade to the version that is maintained in Bookworm. These commands must be run after the full Bullseye → Bookworm upgrade: {{{ # apt install postgresql-contrib # pg_dropcluster 15 main --stop # pg_upgradecluster 13 main # apt purge postgresql-13 postgresql-client-13 }}} The '''pg_upgradecluster''' command might take several minutes, this is expected.