/var/lib/dpkg/tmp.ci/preinst: gitlab-ctl: not found

During upgrade the disk filled and on trying to reinstall I get:-
Preparing to unpack …/gitlab-ce_13.12.15-ce.0_amd64.deb …
/var/lib/dpkg/tmp.ci/preinst: 45: /var/lib/dpkg/tmp.ci/preinst: gitlab-ctl: not found
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_13.12.15-ce.0_amd64.deb (–unpack):
new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I can’t find any answer to fix this. Any ideas?

I think this is probably more of a question about apt-get or whichever other package manager you are using. Have you tried sudo apt-get install --fix-missing or sudo dpkg-reconfigure --all?

I ended up copying gitlab-ctl to /bin temporarily. That worked.