APT Error

Waiting for cache lock – /var/lib/dpkg/lock-frontend held by another process (PID 1466)

root@server:/home/server# sudo apt install apache2 Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1466 (apt)

It seems like another process with PID 1466 is holding the lock on the package manager. This could be another instance of the package manager or another software update process. Here are a few steps you can take to resolve this issue:

Solutions:-

ps aux | grep 1466

Once you identify the process, you can try to kill it using:

sudo kill -9 1466

Remove the lock manually:

sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
sudo apt update

Last updated