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?

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

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

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.

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

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.

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.

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.

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

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

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

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 FaradaySometimes 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

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.

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 FaradaySometimes 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