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:
choco upgrade all
to removed dependencies?When you first install, you will want to use --ignore-depdendencies
(or on an upgrade specified explicitly), then turn on useRememberedArgumentsForUpgrades
feature. Then when you upgrade, it may continue to ignore dependencies (as long as that is not one of the switches that is ignored).
If it is not one you find is ignored, file a ticket at https://github.com/chocolatey/choco/issues/new to have us add it as an enhancement.