NOTE: This question was valid for Chocolatey 0.9.8 and bellow. Later versions are completely rewritten from PowerShell scripts to a C# application and whole process of package management was improved a lot.
I have been using Chocolatey for some time. At the beginning I was excited, but after some time I'm not sure if it's usable yet. I'm concerned the most about proper way of package updating.
For example, I have installed Atom editor using Chocolatey. New versions of Atom are released pretty frequently, so I have updated this package several times. Then I noticed that I have all previously installed versions of Atom still present in a Chocolatey's lib
directory. Chocolatey in fact doesn't update a package; it just installs a new version besides an older one, and it doesn't matter if you use a command choco update <package>
or choco update all
. And there is also currently no way to uninstall previously installed packages using Chocolatey except of the most recent one.
Therefore I wonder what's the proper way of managing package versions using Chocolatey. Should I just manually remove older versions of packages and hope there are no dependencies outside of Chocolatey's package directory?
Or rather do this?
choco uninstall <package>
choco install <package>
What if I don't have installed just one package using Chocolatey, but tens of packages?
Also the fact that each version of package is in individual directory causes various issues (like for example this, this or this).
I don't think this is suitable for real usage. Or maybe I'm missing something. Actually I wish I'm missing something :) Because software management on Windows is quite a pain for years. It's a mess.
I would say that Chocolatey works more as a dependency manager, but it should be a package manager. It advertises itself as "apt-get
for Windows" and apt-get
is a package manager. There is a quite big difference between a package managers (like Chocolatey, apt-get
or brew
) and a dependency managers (like npm
or bower
). Each one of these two approaches is good for different purpose. Who needs to use different versions of Git, Atom, VLC media player, Chrome, etc. at the same time?
It's also discussed for example here and here, but nothing has changed during a year. It seems that it should be addressed in a new client written in C# instead of PowerShell, but it wasn't released yet (should be released before the end of 2014). Until then I don't see any added value in Chocolatey.
UPDATE: In choco 0.9.9+ (C# compiled version) this is no longer the case.
You are correct. Chocolatey folders can get really crazy with updates over time with the PowerShell version. FWIW, the PowerShell version of Chocolatey was an experiment that has stuck around for too long. I've been talking about rewriting it since the end of the first year. Agreed that what you are seeing is ugly. Rest assured this is not how the new version works. There are some packages right now where you do install multiple versions (Ruby and Python), but they are few and far between.
The early designs of Chocolatey were somewhat dependent on NuGet.exe which doesn't have all of the same functionality that NuGet.Core.dll has as far as package management (although it's got some really obtuse bugs that I've filed while writing the C# version of choco).
I'm really excited to release the new version, but the feature parity needs to be there first. It will be FOSSed either just before release or at the same time. It is the version that is going to support the professional/business extensions. There is no way I would attempt to do that with the current PowerShell version. ;)
Right now you can manually jump into the lib folder and delete all of the older folders. The older versions are not even considered there by Chocolatey in most cases. It's looking at only the latest versions. The only mistake it is making is not deleting the older folders (and using version on the folder in the first place).