You are not logged in.

#1 2012-11-11 00:19:54

mamamia88
Member
Registered: 2012-08-29
Posts: 483

How bad is using the --force option?

Say you are trying to upgrade something like gtk and it gives you an error message like file already exists in filesystem and you have a bunch of them. How bad is it to just use the --force option rather than digging through the filesystem and removing the files 1 by 1?   the files would just get rewritten anyway when the upgrade occurs anyway right?

Offline

#2 2012-11-11 00:26:30

Awebb
Member
Registered: 2010-05-06
Posts: 4,437

Re: How bad is using the --force option?

Sometimes it works, sometimes it does. You never know what happens. Finally, my signature has its moment.

Offline

#3 2012-11-11 00:32:12

flipper T
Member
Registered: 2012-09-14
Posts: 419

Re: How bad is using the --force option?

Read this, it specifies when to use --force (section 3.3)

https://wiki.archlinux.org/index.php/Pacman

Last edited by flipper T (2012-11-11 00:32:53)


If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf

Offline

#4 2012-11-11 00:32:38

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,689

Re: How bad is using the --force option?

Do you want to understand what you're doing, and why? Or do you just want to gamble with --force? Have you seen how many threads there are from people who broke their systems with --force?

(edit) the topic flipper T linked also recommends renaming as the first solution, and --force as a second option.

Last edited by 2ManyDogs (2012-11-11 00:35:31)

Offline

#5 2012-11-11 00:33:57

mamamia88
Member
Registered: 2012-08-29
Posts: 483

Re: How bad is using the --force option?

Awebb wrote:

Sometimes it works, sometimes it does. You never know what happens. Finally, my signature has its moment.

well i did it and nothing seems to have broken after reboot.  hopefully it stays that way.  on a side note is there a way to view the complete output of the xfce terminal in a log somewhere?   i can view my pacman.log to see what i did there and i can view my bash history to see what commands i entered but i would like to be able to have a log with all terminal output error messages and all. and guy above me yes i do want to understand what i'm doing.  i want to know what the --force command does.

Last edited by mamamia88 (2012-11-11 00:34:56)

Offline

#6 2012-11-11 00:37:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

Re: How bad is using the --force option?

Offline

#7 2012-11-11 00:39:23

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,689

Re: How bad is using the --force option?

mamamia88 wrote:

and guy above me yes i do want to understand what i'm doing.  i want to know what the --force command does.

man pacman
-f, --force
           Bypass file conflict checks and overwrite conflicting files. If the package that is about to be installed contains files that are already
           installed, this option will cause all those files to be overwritten. This option should be used with care, ideally not at all.

Last edited by 2ManyDogs (2012-11-11 00:39:48)

Offline

#8 2012-11-11 00:43:57

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,371

Re: How bad is using the --force option?

mamamia88 wrote:

Say you are trying to upgrade something like gtk and it gives you an error message like file already exists in filesystem and you have a bunch of them. How bad is it to just use the --force option rather than digging through the filesystem and removing the files 1 by 1?   the files would just get rewritten anyway when the upgrade occurs anyway right?

Depends. With the recent glibc update, an system critical folder was (/lib) replaced with a symlink. This led to a lot of conflicts for some people, but forcing in this scenario led to a broken system. The reason for this is that you cannot extract a symlink onto a existing directory.

In other scenarios, say package foo provides file /etc/abc, but package bar also provides file /etc/abc. So you --force the installation of package bar. Later, you decide to remove package foo, which removes the file /etc/abc. Suddenly package bar is broken, and nobody knows why...

Unless you're explicitly told to use --force by the Arch devs, it's probably a bad idea and you should thoroughly investigate the situation before proceeding.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Online

#9 2012-11-11 00:44:52

mamamia88
Member
Registered: 2012-08-29
Posts: 483

Re: How bad is using the --force option?

2ManyDogs wrote:
mamamia88 wrote:

and guy above me yes i do want to understand what i'm doing.  i want to know what the --force command does.

man pacman
-f, --force
           Bypass file conflict checks and overwrite conflicting files. If the package that is about to be installed contains files that are already
           installed, this option will cause all those files to be overwritten. This option should be used with care, ideally not at all.

thank you for that.   i just want to make sure.  of course i don't want to go running it willy nilly.  of course i will look at the file names and assess my potential risk before going out and running the --force commands. but if i would delete the files or even just rename them before the upgrade the new version would just create new files with the same name so no real reason not too just use --force anyway.  at least that is my understanding of it.

Offline

#10 2012-11-11 01:00:17

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,689

Re: How bad is using the --force option?

Listen to WorMzy (and Allan in the topic karol linked). But you seem to have already decided, so I don't really know why you started this topic.

Last edited by 2ManyDogs (2012-11-11 01:00:30)

Offline

#11 2012-11-11 01:09:12

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,013
Website

Re: How bad is using the --force option?

mamamia88 wrote:

if i would delete the files or even just rename them before the upgrade the new version would just create new files with the same name so no real reason not too just use --force anyway.  at least that is my understanding of it.

If you rename rather than force, then in a worst case scenario, you can move all the renamed files back to "undo" what was just done.  You cannot "undo" a force.

Actually, Awebb's signature would suggest otherwise: you can "undo" a bad --force with a reinstall wink

Last edited by Trilby (2012-11-11 01:10:16)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#12 2012-11-11 01:18:51

mamamia88
Member
Registered: 2012-08-29
Posts: 483

Re: How bad is using the --force option?

Trilby wrote:
mamamia88 wrote:

if i would delete the files or even just rename them before the upgrade the new version would just create new files with the same name so no real reason not too just use --force anyway.  at least that is my understanding of it.

If you rename rather than force, then in a worst case scenario, you can move all the renamed files back to "undo" what was just done.  You cannot "undo" a force.

Actually, Awebb's signature would suggest otherwise: you can "undo" a bad --force with a reinstall wink

ah i finally understand his sig thanks for that.    i will avoid it from now on like the plague. if it comes up again i'll update everything else and wait for news on the offending package

Offline

#13 2012-11-11 01:23:05

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

Re: How bad is using the --force option?

How bad is using a firearm?
How bad is using a chainsaw?
How bad is using a double bit ax?
How bad is using a  lock pick?

Pacman is a tool; a useful tool.  Like all tools, it can be invaluable to someone who knows what they are doing.  It can be abused.  It can be disastrous to someone unfamiliar with its safe usage.   If you are unsure, ask before you hurt yourself.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Online

#14 2012-11-11 01:37:14

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: How bad is using the --force option?

You should really be asking: why do those files exist and pacman doesn't know about them? That is, the conflict typically means something is wrong in your system - and the something wrong may affect a lot more than the particular files pacman identifies as problematic in this particular case. It doesn't always mean this but if you don't know what caused the conflict, you should figure out that first. Then when you know, you figure out how to deal with it. How you should deal with it depends on understanding the cause. Otherwise you are just operating blind, trying to paste sticking plasters over problems which may just be scratches but equally may be deep, gaping wounds.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#15 2012-11-11 01:41:56

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

Re: How bad is using the --force option?

That ^^^ is the best post I've seen on the topic.  It identifies the crux of the issue


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB