Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cxp
Level 1
Level 1
Posts: 7
Joined: Mon Apr 06, 2020 12:22 pm

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by cxp »

Hey guys

I just installed LM on a new machine and after launching the drive manager I got stuck with this message on the terminal.

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Now I cant download new software or upgrade them.

ive tried to kill the process using kill 2068 but «operation not permitted. I also tried the command «systemctl disable packagekit» but it doesnt seem to change things.

i am a bit lost now and I would be very happy to get some direction on hoz to get back on track and enjoy the ride with my new machine.

Thank so much
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by sleeper12 »

Try:

Code: Select all

 sudo killall apt apt-get 
hindrik
Level 1
Level 1
Posts: 2
Joined: Wed Aug 31, 2022 12:07 pm

Re: Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by hindrik »

sudo killall apt apt-get didnt work

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2191 (packagekitd)
Last edited by SMG on Wed Aug 31, 2022 2:13 pm, edited 1 time in total.
Reason: Removed partial duplicate of message for clarity in the post.
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by sleeper12 »

hindrik wrote: Wed Aug 31, 2022 2:01 pm sudo killall apt apt-get didnt work

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2191 (packagekitd)
If you reboot it should remove the lock. If not, after the reboot, do:

Code: Select all

sudo rm -v /var/lib/dpkg/lock-frontend
djph
Level 7
Level 7
Posts: 1933
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by djph »

sleeper12 wrote: Wed Aug 31, 2022 3:51 pm
hindrik wrote: Wed Aug 31, 2022 2:01 pm sudo killall apt apt-get didnt work

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2191 (packagekitd)
If you reboot it should remove the lock. If not, after the reboot, do:

Code: Select all

sudo rm -v /var/lib/dpkg/lock-frontend
no, don't just remove the lock. Make sure the offending process (in this case, packagekitd) isn't running first ...
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by sleeper12 »

Correct, but a reboot should stop it from running. I admit though, I stated it poorly. :(
djph
Level 7
Level 7
Posts: 1933
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2068 (packagekitd)

Post by djph »

sleeper12 wrote: Wed Aug 31, 2022 4:15 pm Correct, but a reboot should stop it from running. I admit though, I stated it poorly. :(
Yeah, that packagekit process is kicked off by (as I recall) cron / systemd-timer (whatever). I think at one time that it had something like an explicit "@reboot" job; in addition to its standard N-hourly scheduled kickoff.
Locked

Return to “Beginner Questions”