This usually occurs when another update was started and hasn’t finished yet. This may be the case when another session was running “imanage” to update the Indeni software but the session was disconnected.
To resolve this issue:
Find the PID of the apt-get process and kill it:
ps aux | grep apt-get | grep -v grep
kill -9 <PID>
Delete the lock files and resume the update:
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a