I’m still a fairly new Linux-user (on Tuxedo OS), and I just ran into an issue that is new to me. If I try to update my system, either via command line or Discover, the apt update command fails. This is the output:

E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1635 (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/

Process 1635 is apt-get update run by root, and persists through restart. I am tempted to try to kill it (kill 1635), but I’m not sure if anything could break from that, so I thought I’d try to ask for help first before I do something stupid.

  • PriorProject@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    I haven’t used Tuxedo, but on apt-based distros it’s pretty common for an auto-update daemon of some kind to run in the background on startup to either download updates, or at least download package metadata so some UI component can start nagging you to install the updates that are available.

    If you wait a few minutes, the download should complete and you can do what you want. You can probably get away with killing it, especially if you use a gentle signal like HUP. I wouldn’t risk it though… if you corrupt your package metadata or worse… and actual important package… it can be a significant hassle to clean up the mess. And the cost of waiting 30s-5m and trying again is so low it’s hard to beat that as an approach.

    If its happening a ton you can probably find and disable the auto-update thing but I don’t know what it would be on Tuxedo.

    • cyberwolfie@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      It persists even after several hours. Never happened before, and I’ve been using the system for about 6 months now. I posted the output from the process tree below, but I’m not sure if that makes anything any clearer. It’s as if it is not receiving any data and just waiting for the servers to respond?