I am trying to upgrade Ubuntu 18.04 with a standard apt update && apt upgrade but I am getting a failure. What should I do to proceed and keep the system updated?

I'm getting the error:

Setting up docker.io (20.10.2-0ubuntu1~18.04.2) ...
mv: cannot stat '/var/lib/docker.migrating/*': No such file or directory
dpkg: error processing package docker.io (--configure):
 installed docker.io package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

The issue has been reported and a workout was suggested here: https://github.com/ubuntu/zsys/issues/170#issuecomment-826359558

Following the steps worked for me.

sudo mkdir /var/lib/docker.migrating
echo 'dummy' | sudo tee /var/lib/docker.migrating/workaround.txt

this will allow the stat '/var/lib/docker.migrating/*' to not fail with an error.

After the successful apt update docker.io run, you can remove the workaround dummy file:

sudo rm /var/lib/docker/workaround.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.