In some cases you will need to install a specific version of a package, this may be for specific software requirements or to perform incrimental upgrade for a package.
To start off with you will want to check which version of the package you have installed aready with the apt-show-versions {package-name-here}
command, this is only aplicable if you have a version installed already.
apt install apt-show-versions
apt-show-versions gitlab-ce
Once you know the version if applicable then you can list the avilable versions of the package using the apt-cache policy {package}
command.
apt-cache policy gitlab-ce
Once you know the nae and version you can then install it using the apt
command
apt install gitlab-ce=12.10.14-ce.0
Updating Gitlab-ce to version 13
This article came about as a user had been asking about an error they had with upgrading their gitlab-ce installation on Debian.
They was receiving an error about not being able to upgrade to an older v12 to the latest v13 when running apt upgrade
.
Preparing to unpack .../gitlab-ce_13.1.3-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.1.3-ce.0_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-ce_13.1.3-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
After explaing about having to perform an incrimental upgrade this was completed for them, for any one else that is having this issue you can upgrade with the below commands.
apt update
apt-cache policy gitlab-ce
apt install gitlab-ce=12.10.14-ce.0
apt install gitlab-ce=13.0.0-ce.0
apt upgrade