#1069167 apt: Please provide lock wait timeout for /var/lib/apt/lists/lock

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Chris Hofstaedtler
Date:
2026-10-07 21:35:01 UTC
Severity:
normal
#1069167#5
Date:
2024-04-17 09:32:05 UTC
From:
To:
Dear APT maintainers,

thanks for implementing DPkg::Lock::Timeout. This is very useful for
dpkg. A similar option would be very welcome for `apt update`, i.e. the
lockfile usually placed at /var/lib/apt/lists/lock.

Without this, scheduled/timed `apt-get update` executions (correctly)
block manually started `apt-get update` executions, but the manual
execution also fails. The failure behaviour is somewhat annoying in
deployment scripts, where it can be worked around with a busy loop, but
I think this is less than ideal.

TL;DR: please provide an option for `apt-get update` to wait on its
lock.

Thanks,
Chris

#1069167#10
Date:
2026-10-07 21:33:28 UTC
From:
To:
I concur this.
While whole-transaction-retry suggested in #1012173 would be nice but difficult-to-implement, I think our lock acquisition order is consistent, so waiting (even indefinitely) shouldn't cause a deadlock hazard, and a timeout design would be justified.

Thanks,
Zheyu Shen