Author: Junner
Date: 5/8/2025
After using sudo apt upgrade
, terminal showed:
Waiting for cache lock: Could not get lock: /var/lib/dpkg/lock-frontend. It is held by process 3399.
I checked the process name by
The process is unattended-upgr
. I knew it's a system service for upgrading packages regularly. I can't turn it off with
By doing this, it'll hold there, no terminated.
But we can terminate it by kill
. Before doing this, let's carefully looking at who's locking.
Someone told me that several processes might there. But for me there was only 3399.
And kill
them all:
The service will restart immediately. So now we should turn the service off.
After rebooting the machine, unattended-upgrades.service
will restart. So no worries.
Now we can sudo apt upgrade
.