How to resolve Could not get lock /var/lib/apt/lists/lock error in Ubuntu


This tutorial is about the fix of a common apt issue that is faced by Debian, Ubuntu, Mint, elementary distribution users.

If you receive below error…

$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

…after adding repositories via apt-add-repository and running apt-get update, then follow below steps.

Steps to follow

Open terminal. Run below commands in sequence, enter password when prompted.

sudo rm /var/lib/apt/lists/* -vf

Wait for the command execution to finish. Now you can run your command apt-get update without any error.


You may also like...

Translate »