You are not logged in.

#1 2009-12-09 03:21:54

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

[SOLVED] Overwrite files with pacman.

Hello all

I know that pacman, as a design feature, does not overwrite files by default. I've read the post and the wiki about it.

But I've a situation where I would need to overwrite dozens of files, in different directories, and it would be very nice, If possible, to make an exception to this rule.

I dont know how, but I've messed up an Kdemod upgrade. It stopped working and I cant uninstall it, because pacman doesnt find the appropriate groups (Kdemod-complete and Kdemod-uninstall).

On the other hand, I cant simply reinstall it, or kde[extra], because pacman gives dozens "leftover file" messages in different directories, and refuses to overwrite them.

I just want a way to reinstall KDEmod, at least to try to remove everything with "pacman -Rd kdemod-uninstall" and start from scratch, if it doesnt work. And, I would like to escape manually removing all the files in different directories or a full system reinstall.

Any Ideas?

Thanks in advance for any help.

Last edited by Raws (2009-12-09 03:44:51)

Offline

#2 2009-12-09 03:30:21

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: [SOLVED] Overwrite files with pacman.

I suspect you're looking for:

# pacman -Sf

Offline

#3 2009-12-09 03:33:01

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: [SOLVED] Overwrite files with pacman.

Well, this doesn't really help you but.... I had the same problem when I installed Gnome and removed KDEmod then went back to KDEmod because Gnome looks so Old.

When I tried to install KDEmod it said it could not overwritten a but load of files. It also would not let me remove KDEmod because I already did. I just wrote a little script to cut out all names of the files then it made a remove command with all the files that needed to go. It was fun and now I know a few more vary useful bash commands.

Last edited by hunterthomson (2009-12-09 03:34:08)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#4 2009-12-09 03:44:23

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

Re: [SOLVED] Overwrite files with pacman.

Yep! That did it. Pacman -Sf was exactly what I was looking for. I didnt find this in the wiki pages. Thanks a lot!

Changing to solved.

Offline

#5 2009-12-09 03:57:03

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: [SOLVED] Overwrite files with pacman.

man pacman will be of great use to you in the future for similar things.  The wiki probably doesn't mention -Sf very loudly 'cause it's generally not recommended.

Offline

#6 2009-12-09 14:30:30

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

Re: [SOLVED] Overwrite files with pacman.

Thanks for the tip. I really need to get more used with man pages.

Offline

#7 2013-06-25 15:16:34

falstaff_ch
Member
Registered: 2013-06-09
Posts: 28

Re: [SOLVED] Overwrite files with pacman.

Just in case someone Googles this Thread, nowadays its

# pacman -S --force <package>

Offline

#8 2013-06-25 15:19:00

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: [SOLVED] Overwrite files with pacman.

1. Thread is ancient. Don't necrobump.
2. Why would you suggest --force'ing?
3. No really, don't use --force, unless explicitly told to do so by the devs.

All the best,

-HG

Offline

#9 2013-06-25 15:27:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: [SOLVED] Overwrite files with pacman.

falstaff_ch wrote:

Just in case someone Googles this Thread, nowadays its

# pacman -S --force <package>

Moderator comment:  That is true as far as the synatax of Pacman command is concerned -- BUT -- using 'force', unless you know exactly what you're doing, is not recommended.  It can cause serious breakage.

In fact, the -f flag was deliberately deprecated in favor of --force specifically to make it less likely that someone will try using it.

Closing this old thread....


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB