You are not logged in.

#1 2008-10-05 23:35:55

Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,171

pacman error: FILENAME exists in filesystem

This comes up quite often, and since users are not using the excellent forum search function, it will be stickied.

error: could not prepare transaction
error: failed to commit transaction (conflicting files)
libname: /insert/file/name/here exists in filesystem
Errors occurred, no packages were upgraded.

Why this is happening: pacman has detected a file conflict, and by design, will not overwrite files for you. This is a design feature, not a flaw.
It is the user's responsibility to maintain their system, not the package manager's. (pacman -Qo may be invoked to query which package owns the file, if any.)

What can be done to solve this: The issue is usually trivial to solve. A safe way is to firstly check if another package owns the file (pacman -Qo <full file path>).  If the file is owned by another package file a bug report If the file is not owned by another package rename (or remove) the the file which 'exists in filesystem', and reissue the pacman -Syu command. If all goes well, the file may then be removed.

As always, there may be exceptions, so check the front page Arch news, Announcement lists, and optionally the forum and Mailing Lists for possible known issues.

pacman can also be forced to overwrite the files, if you know what you are doing. Please read this post for more information.


#2 2008-10-06 00:49:51

is always right
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,483

Re: pacman error: FILENAME exists in filesystem

Good idea.  I adjusted it a bit to include checking for file ownership and filing a bug report if there is a true conflict.


#3 2008-10-06 00:57:51

From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233

Re: pacman error: FILENAME exists in filesystem

Just a suggestion, you may want to link the "file a bug report" text to … Guidelines since the point of this is people not searching.

archlinux - please read this and this — twice — then ask questions.
-- |


#4 2009-12-07 19:22:10

Registered: 2009-10-17
Posts: 10

Re: pacman error: FILENAME exists in filesystem

Ok, what if I want to do a massive system update and as a result I come up with circa 200 files that "exist in filesystem". I don't think I want to run "pacman -Qo" and rename all of it and I don't think system update with force is quite good idea...
What can I do?


#5 2009-12-07 19:58:25

Forum Fellow
Registered: 2006-11-26
Posts: 5,819

Re: pacman error: FILENAME exists in filesystem

If that's what happens, then there's something wrong. Let's call it common sense wink. 200 files is quite a lot. I've never had a 'massive' update myself that gave that many duplicate files - I hope you took the time to read Misfit138's recommendations and acted upon them - and I hope you update regularly, but your wording suggests you don't. That in itself can cause things to break more easily.

Also - I recommend you open your own topic instead of hijacking a sticky for this. This isn't supposed to turn into a help topic.

Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy


Board footer

Powered by FluxBB