Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

pacman stopped working and asked me to delete a file if "another package manager isn't working". What is the file for deleting files?

share|improve this question
what? rm is for deleting files. pacman asked you to delete what file? what's the exact error message – xenoterracide Jan 13 '11 at 15:35
wonders why this is now +1, as far as questions go this is pretty bad – xenoterracide Jan 14 '11 at 13:18
up vote 8 down vote accepted

You delete files with the rm command, e.g.:

rm /var/lib/pacman/db.lck

I hate to be "that guy", but if you don't know how to delete a file from the Linux command line, Arch is not the Linux distribution for you. Try something easier, like Ubuntu or Linux Mint first.

share|improve this answer
Thanks. I tried Ubuntu but it was too slow on my PC. I'm hoping I'll be able to learn linux through Arch now :) – Samrat Man Singh Jan 13 '11 at 15:41
I'd try Lubuntu or Crunchbang or Puppy then. Heck, even Damn Small Linux would be easier than Arch. – frabjous Jan 13 '11 at 15:51
I saw your other question regarding a lightweight distro. It's great that you are so keen on learning. Just keep in mind that you yourself asked for the steep curve :) – phunehehe Jan 13 '11 at 15:56
@phunehehe- Thanks for the encouragement!! :) pacman worked after deleting the file it asked to delete. Issues are still coming up but at least I'm progressing!! :D – Samrat Man Singh Jan 14 '11 at 7:18

If pacman is complaining there is ususally a good reason; don't ignore complaints unless you find good reason to, e.g. if it says "it's okay to ignore the error". Good practice would be to check your logs first and foremost.

A lot of the logs live in /var/log/. This will show the tail end or last couple of lines from everything.log; which contains most errors across the system as they happen:

# cat /var/log/everything.log | tail

It's also worth seriously noting that running two package managers/instances of pacman at the same time is not a good idea. Did you start one then try to start another? It may be waiting for your input:

Proceed with installation? [Y/n]

Then you try to use `pacman to install something else without answering and get:

error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck`

The one thing that you should learn early is that deleting anything should be your absolute last resort, in any situation with linux. There is no 'trash bin' with the commandline, delete really means its gone.

share|improve this answer
I'm pretty sure none of this answered his question; pacman told him to remove /var/lib/pacman/db.lck and he doesn't know how -- he's looking for rm /var/lib/pacman/db.lck – Michael Mrozek Jan 14 '11 at 0:03
Agreed. # rm /var/lib/pacman/db.lck Got caught up in the why rather than how. ..sips coffee – Nolochemical Jan 14 '11 at 0:15
That's it! Thanks – Samrat Man Singh Jan 14 '11 at 14:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.