Upgrade gitlab-runner

I am oddly unable to upgrade gitlab-runner on my amd64 Ubuntu. The current version I have is 16.8. I am following the necessary steps to upgrade to the latest version (17.3) like this:

gitlab-runner stop
rm /etc/systemd/system/gitlab-runner.service
apt remove gitlab-runner

Then installing afresh:

apt install gitlab-runner

During installation I see the correct new version I want:

Распаковывается gitlab-runner (17.3.1-1) …
Настраивается пакет gitlab-runner (17.3.1-1) …
GitLab Runner: detected user gitlab-runner
Runtime platform arch=amd64 os=linux pid=1401153 revision=66269445 version=17.3.1
gitlab-runner: the service is not installed
Runtime platform arch=amd64 os=linux pid=1401162 revision=66269445 version=17.3.1
gitlab-ci-multi-runner: the service is not installed
Runtime platform arch=amd64 os=linux pid=1401188 revision=66269445 version=17.3.1
Runtime platform arch=amd64 os=linux pid=1401248 revision=66269445 version=17.3.1

But then after installation I do

gitlab-runner start

…and get:

Runtime platform arch=amd64 os=linux pid=1401356 revision=c72a09b6 version=16.8.0

Also version checking (gitlab-runner -v) gives

Version:      16.8.0
Git revision: c72a09b6
Git branch:   16-8-stable
GO version:   go1.21.5
Built:        2024-01-18T22:42:25+0000
OS/Arch:      linux/amd64

That is, it seems, I still have my old version of gitlab-runner which I must have removed!

What’s the best way to proceed?

sudo systemctl stop gitlab-runner.service

This will stop the GitLab Runner service, ensuring that it’s not running in the background and interfering with the upgrade process.