After apt-get upgrade -terminal frozen

Apt-get update was fine but after apt-get upgrade -terminal frozen ay mysql message about log.

Told another script is locking it.

root@zorin162-VirtualBox:~# apt-get upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 59302 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
root@zorin162-VirtualBox:~# apt-get upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 59302 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
root@zorin162-VirtualBox:~# rm /var/lib/dpkg/lock
root@zorin162-VirtualBox:~# dpkg --configure --pending
dpkg: error: dpkg frontend lock is locked by another process

What to do?

If another process is using updates you can't have two sessions of updates at once. For example, if you start Software Updater off you can't install packages via Synaptic, as dpkg is having to run to install the updates - this is the only time this happens - you can't have to instances of 'root' elevation at once.

1 Like

Something else is running an update, most likely the built in software updater.

you can find out where it says "it is held by process 59302"

in terminal type

top -p 59302

Just change the process number by what ever one is currently showing as an error

it will show you the process information and on the far right the command being run - here is an example of a process
image

1 Like

Thank you guys. I thought I waited but it took so long, 15 mins.
I like the check too, thanks.

All good now anyway.

2 Likes

how to stop it? specially the apt-get

try

killall apt-get

if that fails, get the PID
and

kill -SIGKILL pid
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.