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.

  • ThingsThatKillYou@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    2 years ago

    Check if the process is actually running

    ‘ps aux | grep 1635’

    (You should see a line output)

    More likely its not running and crashed without cleaning up the lock file, you might want to figure out why from logs and whatnot but its ok also to remove that file and try again

    • FigMcLargeHuge@sh.itjust.works
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      2 years ago

      (You should see a line output)

      Just a reminder that the line you see shouldn’t be the grep line. You can use ‘ps aux | grep 1635 | grep -v grep’

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

      It’s showing up in the list with a bunch of sub-processes that looks like https-requests (I posted the output below). Which logs could I check to learn more about what’s happened?

      When you say remove the file, do you mean the lock file?