Tuesday, April 7, 2009

How to resolve Locked YUM

Mistakenly many times YUM is locked. When this happens for such problem like
Existing lock /var/run/yum.pid: another copy is running as pid 18092.

Here's the way to resolve.
Locate the yum.pid file, usually in fedora, it is located in /var/run dir
cd /var/run
ls
vim yum.pid

press insert
delete pid number and save pressing esc + : +
x then press enter

now run your yum command

5 comments:

  1. I simple kill the process
    ps aux|grep yum
    kill -9 [PID]

    ReplyDelete
  2. You should be careful about getting rid of processes running yum, as they might be in the middle of installing something. At least by my book, I always try to give the process 30 sec.s before worrying about getting around the lock

    ReplyDelete
  3. or better yet, attach strace to the process and make sure it isnt doing anything first.

    ReplyDelete
  4. but sometimes simply killing process does not work you know

    ReplyDelete
  5. I just deleted pid number...and started yum for vlc installation and it worked....
    thanks...

    ReplyDelete