Any quick help?

  • 0
    Check if a background updater is running. That's usually it for me.
  • 1
    ps aux | grep apt- Will get you the process using apt.
    kill -9 (process_number)
  • 5
    $ sudo rm -rf /var/lib/dpkg/lock

    A lock file is created when a background process is being downloaded or installed(whatever apt-get is doing in bg). By deleting the lock file, you get access back to your apt-get, and hence you can install remove whatever you want to.
  • 2
    @kabhishek that sounds like good advice but your ++ is 666 and you used rm -rf....
  • 2
    @kabhishek the lock file is there for a reason! Don't just assume there is no any other apt process running
  • 0
    @Kimmax true, no doubt it is running in bg hence the lock exists. It is a workaround to get access to apt-get back due to some lagging issue with download or installation. Deleting lock file, he can just apt-get update and upgrade to fetch and reinstall the programs?

    @chadd17 yeah, I rant less and comment more so less ++. I used to deal with this issue some years back when Ubuntu was my base OS and never faced any problem despite deleting the lock. Always worked flawlessly. Idk how Ubuntu had evolved now, besides the gnome as default dm.
  • 0
  • 1
    Turn it on and off again. Reinstall Linux maybe. Or get a real distro not that Debian based thing
  • 2
    @kabhishek I know that deleting the lock file will give you access back, but as I said it's there for a reason!
    You should never run 2 different apt/dpkg processes at the same time. If an old one stalls, get rid of it first. The lock is there to ensure that policy.
    Chances are that you run two concurrent dpkg processes and end up in a deadlock. You don't want that.
Add Comment