← All Kali Issues
apt

Could not get lock

P Package High

🔴 Error Message

E: Could not get lock /var/lib/apt/lists/lock

📖 What This Means

Another apt process is running or crashed without releasing the lock file.

🔧 Step-by-Step Fix

  1. Check running: ps aux | grep apt
  2. Wait for it to finish
  3. Remove lock: sudo rm /var/lib/apt/lists/lock
  4. Remove frontend lock: sudo rm /var/lib/dpkg/lock-frontend
  5. Reconfigure: sudo dpkg --configure -a