Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ps aux | grep apt- Will get you the process using apt.
Then
kill -9 (process_number) -
Simple!
$ 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. -
Kimmax109877y@kabhishek the lock file is there for a reason! Don't just assume there is no any other apt process running
-
@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. -
Turn it on and off again. Reinstall Linux maybe. Or get a real distro not that Debian based thing
-
Kimmax109877y@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.
!Rant
Any quick help?
undefined