Chocolatey.org: Install vs. Upgrade



  • Looking at my scripts to install / update applications using Chocolatey.org I noticed when I did an Upgrade on an application that wasn't installed, it installed it for me.

    C:\WINDOWS\system32>choco upgrade javaruntime -force -y
    Upgrading the following packages:
    javaruntime
    By upgrading you accept licenses for the packages.
    javaruntime is not installed. Installing...
    
    jre8 v8.0.101 (forced)
     Searching if new version exists...
     Downloading jre8 32 bit
       from 'http://javadl.oracle.com/webapps/download/AutoDL?BundleId=211997'
     Installing jre8...
     jre8 has been installed.
     Downloading jre8 64 bit
       from 'http://javadl.oracle.com/webapps/download/AutoDL?BundleId=211999'
     Installing jre8...
     jre8 has been installed.
     Searching if the previous version exists...
     The upgrade of jre8 was successful.
    
    javaruntime v8.0.73 (forced)
     The upgrade of javaruntime was successful.
    
    Chocolatey upgraded 2/2 package(s). 0 package(s) failed.
     See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
    


  • Upgrade is standard nomenclature for packaging systems to upgrade of installed and to install if not. Upgrade on RPM is identical.

    On RPM, what you would be looking for is called Freshen.



  • If you don't specify package names it will only upgrade what is installed.



  • @scottalanmiller said in Chocolatey.org: Install vs. Upgrade:

    If you don't specify package names it will only upgrade what is installed.

    Right. I have scheduled task that runs this command.

    choco upgrade all -y
    


  • @JaredBusch said in Chocolatey.org: Install vs. Upgrade:

    @scottalanmiller said in Chocolatey.org: Install vs. Upgrade:

    If you don't specify package names it will only upgrade what is installed.

    Right. I have scheduled task that runs this command.

    choco upgrade all -y
    

    That is much easier than doing them one at a time. Thanks.


Log in to reply