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

1 min

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.



Creator and author of Connect with me via Telegram, Twitter, or send us an email.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments