259

I have the following packages installed with Chocolatey.

choco list

> choco list
Chocolatey v0.9.9.2                                      
adobereader 11.0.10                                      
ccleaner 5.03.5128                                       
chocolatey 0.9.9.2                                       
ConEmu 14.9.23.0                                         
gimp 2.8.14.1                                            
git 1.9.5.20150114

One week later the GIMP package updated to 2.9 and the Git package is updated to 1.9.6 on the chocolatey.org website, but other packages are not updated.

Two weeks later I need to run a command in cmd to show the following result:

> some command
git current local version (1.9.5), latest version (1.9.6) is available for upgrade
gimp current local version (2.8), latest version (2.9) is available for upgrade

What is the good way to compose such command? (Or if there is a command option built into Chocolatey itself, what it would be?)

5
  • 1
    choco list without --localonly freezes (Resuming with Ctrl+c), is this wanted?
    – Timo
    Oct 2, 2020 at 19:07
  • 3
    @Timo it doesn't freeze actually, it might just take a long time to gather all available packages Dec 1, 2021 at 12:47
  • 1
    choco list --localonly now fails with Invalid argument --localonly. This argument has been removed from the list command and cannot be used.
    – AJM
    Aug 18, 2023 at 10:57
  • 1
    Re my previous comment - apparently the default behaviour of choco list is now only to list installed packages, so it has the same effect that choco list --localonly used to.
    – AJM
    Aug 18, 2023 at 11:41
  • 1
    @AJM thank you for the input, I updated the question to keep up with the version 2 default behavior. Sep 1, 2023 at 2:53

4 Answers 4

279

Note: You likely need to do the following commands in an administrative cmd/powershell prompt.

If you have choco 0.9.9.6+, you can use the outdated command.

choco outdated

If you have 0.9.9+ installed:

choco upgrade all --noop

If you have version 0.9.8.33 or below installed:

choco version all

Following that, if you actually want to upgrade - you can follow with:

cup all -y

Note: -y will only work with 0.9.8.33+.

2
  • 1
    Just a note that choco version command is deprecated and will be removed in version 1.0.0. While the recommendation from that error is to use choco upgrade pkgname --noop the outdated command seems to work nicely as well. Jun 2, 2020 at 16:51
  • 2
    That seems like a step backwards from a readability perspective to me. Jan 14, 2021 at 23:09
29

Just run the case, and choco said I should use this

choco list -lo

That did the trick for me, so here 2c from me.

1
  • 1
    That gives me this error: Invalid argument -lo. This argument has been removed from the list command and cannot be used. Sep 12, 2023 at 23:11
4

Addition from @feventcoder

choco version all will result you a warning of

DEPRECATION NOTICE - choco version command is deprecated and will be removed in version 1.0.0. Please use choco upgrade <pgkname> --noop instead.

So it mean you should learn that it might not support the version command anymore.

Sure that you need to upgrade your chocolatey version to 0.9.9+ or latest.

By the command choco upgrade chocolatey

And then call cup all -y to install all upgrade to your system.

3

Use "cver"

The quickest way if you want to find only the local packages installed is to issue the following command to a DOS prompt:

cver all -localonly

Or even easier to remember and type:

cver all -lo

This avoids unnecessary querying.

4
  • 1
    The question is to distinguish outdated packages from latest ones. With cver all -localonly this command, we will get outdated packages and latest packages mixed and do not achieve the purpose of finding outdated packages. This answer should for question "how to show local packages?" but not this question. Apr 1, 2017 at 19:30
  • interesting since i must have missed that, I landed here trying to solve an installed package dilemma, where this question helped but didn't lead to the solution. Apr 2, 2017 at 6:25
  • This is exactly what I needed! Just a simple list of installed packages. BTW, choco version is deprecated, and choco list -localonly works the same way, now.
    – jpaugh
    Jul 17, 2020 at 14:26
  • choco list -localonly (or -lo) is actually better than cver all -lo, as it lists all of my installed packages ("24 packages installed"), whereas cver only shows a partial list ("20 packages installed"?!). Use: choco list -lo. Aug 10, 2020 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .