I am new to Chocolatey and I installed zulu as an alternative to Oracle Java (choco install zulu).
Then I installed an app requiring Java choco install pdfsam.install, which installed Oracle JRE as a dependency. I thought to be smart and, later, I tried to choco uninstall javaruntime. But I got an error "because 'pdfsam.install 3.3.2' depends on it.".
By reading the commands' help, I saw the install switch --ignore-dependencies and the uninstall switch --force-dependencies and --force.
The first two are clear. So I could:
choco uninstall pdfsam.install --force-dependencies
choco install pdfsam.install --ignore-dependencies
As regards --force, it is unclear what it does and its use is kind of discouraged:
--force
Force - force the behaviour. Do not use force during normal operation - it subverts some of the smart behaviour for commands.
It could mean uninstall a package even if another package depends on it. (who knows?)
My questions are:
- What if I run a routine
choco upgrade allto removed dependencies? - My app is just an example. Beyond JRE an app might have other non-ignorable dependencies. Can I selectively ignore dependencies?