E: Could not get lock /var/lib/apt/lists/lock. It is held by process 2272 (packagekitd) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to lock directory /var/lib/apt/lists/ code example

Example 1: E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

sudo lsof /var/lib/dpkg/lock
sudo lsof /var/lib/apt/lists/lock
sudo lsof /var/cache/apt/archives/lock

Example 2: how to fix could not fix var lock /var/lib/dpkg/lock ubuntu

sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

Example 3: why upgrade ubuntu then frequently shows this message "It iwating for cache lock: Could not get lock /var/lib/dpkg/lock.frontend.

It iwating for cache lock: Could not get lock /var/lib/dpkg/lock.frontend.

Tags:

Misc Example