In practice the two processes that run apt-get update are unaware of each other. When I'm updating of course I wouldn't intentionally run two instances in parallel. Indeed the other process is likely apt- daily.service.
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1939665 Title: "apt-get update" fails if another instance is running Status in apt package in Ubuntu: Triaged Bug description: This snippet: sudo apt-get update & sudo apt-get update & wait; wait will result in one apt-get run succeeding and the other failing on the lock: [1] 3006473 [2] 3006474 Hit:1 http://ports.ubuntu.com/ubuntu-ports groovy InRelease Hit:2 http://ports.ubuntu.com/ubuntu-ports groovy-backports InRelease Hit:3 http://ports.ubuntu.com/ubuntu-ports groovy-security InRelease Hit:4 http://ports.ubuntu.com/ubuntu-ports groovy-updates InRelease Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock. It is held by process 3006476 (apt-get) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to lock directory /var/lib/apt/lists/ Reading package lists... Done [1]- Done sudo apt-get update [2]+ Exit 100 sudo apt-get update Note that apt-get upgrade will correctly wait. ProblemType: Bug DistroRelease: Ubuntu 20.10 Package: apt 2.1.10ubuntu0.3 ProcVersionSignature: Ubuntu 5.8.0-48.54-generic 5.8.18 Uname: Linux 5.8.0-48-generic aarch64 ApportVersion: 2.20.11-0ubuntu50.7 Architecture: arm64 CasperMD5CheckResult: skip Date: Thu Aug 12 07:50:16 2021 ProcEnviron: LC_TIME=C.UTF-8 TERM=xterm-256color PATH=(custom, no user) LANG=C.UTF-8 SHELL=/bin/bash SourcePackage: apt UpgradeStatus: Upgraded to groovy on 2021-03-25 (139 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1939665/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp