Leeroy
Leeroy

Reputation: 2150

choco install or choco upgrade with different install arguments without re-downloading

choco upgrade --force -y --installarguments "/quiet REMOVE=DS" calibre removes the desktop shortcut for Calibre, but this command re-downloads the whole package to do so.

Without --force it doesn't work.

Is there a way to use the already existing C:\ProgramData\chocolatey\lib\calibre\calibre.nupkg and not re-download the package?

Upvotes: 1

Views: 1103

Answers (1)

Gary Ewan Park
Gary Ewan Park

Reputation: 18991

The instruction that you are giving to Chocolatey is to expressly re-run the entire command again, which will result in it re-downloading the package.

As a workaround, you could do the following:

  1. Copy the calibre.nupkg from the C:/programdata/chocolatey/lib/calibre folder to another location, for example C:/temp
  2. Use the following command choco upgrade --force -y --installarguments "/quiet REMOVE=DS" calibre --source C:\temp

This will use the local package (the nupkg) rather than downloading it again from the Community Repository.

Upvotes: 1

Related Questions