What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The error usually means another program is using Ubuntu’s APT or dpkg package database. Close other package managers, identify the process holding the lock, let legitimate work finish, and only terminate a process that is demonstrably frozen. Do not start by deleting lock files.
Quick, safe recovery
- Stop entering additional APT commands and close App Center, Software Updater, Synaptic, and terminals running
apt,apt-get,aptitude, ordpkg. - Wait several minutes if Ubuntu has just booted or recently came back online; automatic updates may be running.
- Check the lock owner:
sudo fuser -v /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend - If the process is active, allow it to finish. If it is confirmed frozen, terminate it gracefully as described below.
- Repair any incomplete configuration and verify APT:
sudo dpkg --configure --pending sudo apt update
This conditional sequence follows the Debian dpkg team’s guidance: wait or quit the frontend, inspect the holder, and repair dpkg afterward.
What the lock error means
APT and dpkg use process-bound locks so two operations cannot modify package data simultaneously. The filename can remain on disk after a process exits; its presence alone does not prove that it is currently locked.
| Path | Generally protects |
|---|---|
/var/lib/dpkg/lock-frontend |
Frontend-level package operations |
/var/lib/dpkg/lock |
dpkg’s package database |
/var/lib/apt/lists/lock |
Downloaded repository index lists |
/var/cache/apt/archives/lock |
Cached package archives |
open (11: Resource temporarily unavailable) normally means another process holds the lock. open (13: Permission denied) is different and usually means the command lacks sufficient privileges, such as when sudo was omitted. See the distinction in this Ask Ubuntu explanation.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Why Ubuntu reports a held lock
- Another
apt,apt-get,dpkg, oraptitudecommand is running. - App Center, Software Updater, Synaptic, or another graphical frontend is installing packages.
- An automatic update started after boot or on its scheduled timer.
- A previous upgrade was interrupted.
- Cloud-init, provisioning, configuration management, a VM startup task, or a container build is using APT.
- Two terminal commands were launched at the same time.
- A package process is genuinely stuck.
Find the process holding the lock
Inspect the common lock files
sudo fuser -v /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
sudo fuser -v /var/lib/apt/lists/lock /var/cache/apt/archives/lock
An alternative for one path is:
sudo lsof /var/lib/dpkg/lock-frontend
List package-related processes
ps -ef | grep -E '[a]pt|[d]pkg|[u]nattended'
pgrep -a -f 'apt|dpkg|unattended'
apt,apt-get, or a graphical frontend is normally safe to wait for.unattended-upgrademay be a normal security update.dpkgmay be unpacking packages or running maintainer scripts; do not kill it casually.- “Frozen” depends on the operation, package size, disk speed, network, and maintainer scripts. A long-running process is not automatically stuck.
Check automatic updates
On systemd-based Ubuntu installations, inspect services and timers:
systemctl status apt-daily.service
systemctl status apt-daily-upgrade.service
systemctl status unattended-upgrades.service
systemctl list-timers --all | grep -E 'apt|unattended'
Ubuntu documents automatic-update settings in /etc/apt/apt.conf.d/20auto-upgrades; APT’s periodic behavior is described in its apt.conf manual and the Ubuntu automatic-updates guide.
If unattended-upgrades is active, normally let it finish. If an administrator has confirmed it is stuck and must regain control, stop that service before repair:
sudo systemctl stop unattended-upgrades
Do not routinely remove automatic updates: they provide security maintenance. Adjust APT periodic settings when scheduling is the problem instead of deleting locks or purging the package.
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
When to wait, and when to stop a process
Wait for active work
Waiting is the safest option when output, disk activity, logs, or package progress indicate legitimate work. Closing a GUI frontend is low risk; abruptly ending dpkg during unpacking or configuration is not.
Terminate only a confirmed frozen process
Record the PID and command first. Debian’s recommended interactive sequence sends TERM before considering a forceful signal:
sudo fuser -vki -TERM /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
If the process does not respond and intervention is unavoidable:
sudo fuser -vki -KILL /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
KILL is a last resort. Never kill a process merely because a lock filename exists. On a server or VM, take a snapshot or backup where practical and check that no deployment or security update is in progress.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Repair an interrupted package operation
Complete pending configuration
sudo dpkg --configure --pending
This configures packages that were unpacked but not fully configured. If the exact error says “dpkg was interrupted, you must manually run ‘sudo dpkg –configure -a’,” use:
sudo dpkg --configure -a
Repair dependencies and refresh metadata
sudo apt-get -f install
sudo apt update
apt-get -f install asks APT to correct dependency problems; apt update refreshes repository metadata and does not itself upgrade installed packages. If configuration names a particular package or maintainer script, troubleshoot that package—the lock is no longer the main issue.
Would rebooting help?
A normal reboot can clear a transient process conflict after applications are closed and no package operation is making progress. It does not repair incomplete configuration, so run sudo dpkg --configure --pending afterward when required. Never forcibly power off while Ubuntu reports that packages are being installed or while dpkg is actively writing.
Do not delete lock files
Never use lock-file removal as the first fix. Commands often suggested online include:
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
sudo rm /var/lib/dpkg/lock*
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
dpkg locking belongs to the active process, not simply to the filename. Removing a file can let another operation proceed while the original process still modifies package data, causing an incomplete installation, corrupted package database, or filesystem damage. The Debian dpkg team explicitly says that removing dpkg lock files is not the correct solution: dpkg FAQ.
Distinguish related errors
Permission denied
E: Could not open lock file ... - open (13: Permission denied)
Retry with appropriate privileges, for example sudo apt update. If sudo fails, investigate the account, sudo configuration, or a restricted container.
“dpkg was interrupted”
Run sudo dpkg --configure -a, then retry APT.
Broken dependencies
Run sudo apt-get -f install. This is dependency repair, not proof that a lock is currently held.
Repository, DNS, or signature failures
Mirror, network, release-file, and signature errors require repository or network troubleshooting, not lock removal.
Best Value
- [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
- 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
- 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
- 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Read-only filesystem
Investigate mount status and disk/filesystem health before attempting package repairs.
Special environments
WSL
Check every shell in the same distribution, startup scripts, and Linux processes. A Windows process does not normally own the Linux APT lock.
Docker and containers
Parallel package operations inside a container can collide. Order package installation in one build step or process and fix the Dockerfile rather than adding repeated kill commands.
Cloud images and provisioning
Cloud-init, first-boot scripts, and configuration-management tools may be installing packages. Check their status and logs and wait for provisioning to finish.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Remote servers
Before stopping anything, confirm that no deployment, security update, or configuration-management run is active. Use a maintenance window or console access if the host is unresponsive.
Inspect logs when the error keeps returning
sudo journalctl -u apt-daily.service
sudo journalctl -u apt-daily-upgrade.service
sudo journalctl -u unattended-upgrades.service
sudo tail -n 100 /var/log/dpkg.log
sudo tail -n 100 /var/log/apt/history.log
sudo tail -n 100 /var/log/apt/term.log
/var/log/dpkg.log records dpkg activity, while /var/lib/dpkg/status is the package status database. Repeated contention usually points to a scheduled update, boot-time automation, a provisioning script, or a second interactive package manager; identify that cause instead of deleting locks.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




