• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How to Fix “E: Could not get lock /var/lib/apt/lists/lock” or “lock /var/lib/dpkg/lock” Problem

How to Fix “E: Could not get lock /var/lib/apt/lists/lock” or “lock /var/lib/dpkg/lock” Problem

By Sourabh / March 12, 2015 Category: How To, Ubuntu

How to solve Ubuntu Update Errors in Ubuntu 14.10/14.04. Fix could not get lock error in ubuntu – “E: Could not get lock /var/lib/apt/lists/lock” or “E: Could not get lock /var/lib/dpkg/lock” problem.

There are various reasons you may get an error while updating or upgrading Ubuntu by apt-get update command. Let us see how to fix this problem.

For a better understanding here are the message that you encounter when you try to run apt-get update command in Ubuntu:

E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

 

Get-Lock-Error-Ubuntu

Here are the reasons for this problem:

  • Try to run/execute an apt command without “sudo.”
  • Apt database is locked or hang after install or remove software.
  • Using apt-get while Ubuntu Software Center is running in background.
  • Two apt-get commands are executed at the same time.
  • Run apt-get commands while applications is updating/running in the background.

In simple words, this happens if ‘Update Manager’ is running in parallel for any update or upgrade as install process places Lock. You can fix this problem by simply removing all of the temporary list in /var/lib/apt/lists/ and lock file in the cache directory in /var/cache/apt/archives/lock.

Ther are various commands to solve this error. Here are few of them:

Solution 1


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

Force package to reconfig


sudo dpkg --configure -a

Solution 2

Apply following commands in a terminal to solve this problem,


sudo su
sudo rm /var/lib/apt/lists/lock
sudo rm /var/lib/dpkg/lock
apt-get update

Solution 3


sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
apt-get update

Solution 4


cd /var/lib/dpkg
open lock
sudo dpkg –configure -a

Tags: Could not get lock /var/lib/apt/lists/lock problem, How to Fix "E: Could not get lock /var/lib/apt/lists/lock", How to Fix "E: Could not get lock /var/lib/dpkg/lock", How to fix could not get lock error in ubuntu, How to fix E: Could not get lock /var/lib/apt/lists/lock problem, How to Fix Ubuntu Update Errors, Package Manager Troubleshooting Procedure, Ubuntu 14.04, Ubuntu 14.10, Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

Primary Sidebar

Latest Posts

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

3 Commands To Check USB Connection In Linux Terminal

Linux Terminal Commands for Beginners With Examples

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap