You are not logged in.

#1 2010-08-31 19:13:48

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

[SOLVED] Orphan cleaning command error.

Hi, I saw a command for removing orphans mentioned by Allan in this thread: https://bbs.archlinux.org/viewtopic.php?pid=432812 that goes like this:

pacman -Rs $(pacman -Qqtd)]

I have to include sudo with my pacman commands as I use my user, not root so :

 sudo pacman -Rs $(sudo pacman -Qqtd) 

But when I do this I get the following error regarding a database.

 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 

What is going on here? To my common sense it looks like some sort of mechanism to stop more than one package manager from running at once (I'm not btw, I've checked). And I'm not going to go ahead and follow what the error said and remove this db.lck file without asking on here first what's it all about. There's nothing from the wiki regarding this file and pacman I could find.

Last edited by Ben9250 (2010-08-31 23:01:34)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#2 2010-08-31 19:28:46

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] Orphan cleaning command error.

The error means exactly what it says.  So, if there isn't a package manager running do what it asks.

The command should work fine, although you don't need the second sudo:

 sudo pacman -Rs $(pacman -Qqtd) 

Be careful and check what it intends to remove before proceeding.

edit:  spelling

Last edited by loafer (2010-08-31 19:29:19)


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2010-08-31 19:30:19

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,676

Re: [SOLVED] Orphan cleaning command error.

pacman -Qxxx commands dont need to be run as root

edit:  too slow

Last edited by skunktrader (2010-08-31 19:31:39)

Offline

#4 2010-08-31 23:01:17

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: [SOLVED] Orphan cleaning command error.

I ended up deleting the file, a few other pages showed errors relating to this file and it was simply deleted in all of them - with so side effects. I've since cleared all orphans, done a system updates and rebooted, and everything is fine.


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

Board footer

Powered by FluxBB