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: 6,275

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
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

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)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

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,440

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

Offline

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

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

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)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

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

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

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: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#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
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

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)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

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

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
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)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#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: 19,740

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
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

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

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

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.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

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

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

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
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB