I think you are a little confused at the problem here. The issue is that partial updates are not supported. The reason for this is very simple, Arch ensures that any given package list works on its own, but not that packages from different versions of the package list work together. So if Firefox depends on libssl the new Firefox package may depend on a new libssl function. If you install that version of Firefox without updating libssl it will cause problems.
There is no way around this limitation. If you install that new Firefox without he new libssl you will have problems. No matter how you try to rules lawyer it. Now 99% of the time this works. Typically packages don't depend on new library functions right away. But sometimes they do, and that is why as a rule this is unsupported. You are welcome to try it, but if it breaks don't complain to the devs, they never promised it would work. But this isn't some policy where you can find a loophole. It is a technical limitation. If you manage to find a loophole people aren't going to say "oh, that should work, let's fix it" it will break and you will be on your own to fix it.
Focusing on your commands. The thing is that pacman -S firefox
is always fine on its own. If Firefox is already installed it will do nothing, if it isn't it will install the version from the current package list. Both of those operations are supported. Also pacman -Rs firefox && pacman -S firefox
is really no different than just pacman -S firefox
(other than potentially causing problems if the package can't be allowed to be removed due to dependencies). So your command isn't accomplishing anything even if it did somehow magically work around the rules.
What is really the problem is pacman -Sy
. This command updates the package list without actually updating any packages. This will enter you system into a precarious state where any new package installed or updated (example our pacman -S firefox
command form earlier) will be a version that is mismatched with the rest of your system. This is unsupported and will occasionally cause problems. Generally speaking you shouldn't run pacman -Sy
, any time you are using -Sy
you should also be passing -u
. This ensures that the package list and your installed packages are updated together.