Following this Tweet, it would be great if we could have something like a
choco clean-upgrade
which would do basically:
~~~
the upgarding process is really messy now.
While I understand your frustration I can't help that software developers keep old versions of their software around.
As I suggested before, I would reach out to the maintainers of the package and ask if they are willing to cleanup older versions of the installation.
Unfortunately this is not an task for Chocolatey (choco.exe), as the software installs packages and executes the scripts inside the packages. What happens inside the package script is not part of the Chocolatey code and therefore Chocolatey can't solve this issue.
Doing an uninstall of a package is currently no guarantee that the software is uninstalled. There is currently no requirement that the uninstallation of a package is successful and the software is actually uninstalled.
Dear @mkevenaar ,
Let's acknowledge the problem first. When you run
choco update all
what is the expected behavior you would like to see?
@Foadsf I wanted to follow up here with regard to this issue, and also some of the tweets that you have sent recently at well.
The first thing that I want to clarify is "what" Chocolatey is. Chocolatey is a Package Manager for Windows. It manages packages. Those packages can/do install applications onto the Windows machine, and Chocolatey provides some helper methods to help with this endeavour.
So, for example, when you say this:
plus the installation path is still a huge issue. if this is not going to be standardized then at least this could be reported to the user through
https://twitter.com/fsfarimani/status/1244570106551848960
I need to make sure that we are talking about the same thing. The installation path of the package is _always` the same, this never changes. Where the package maintainer decides to install the application to is dependent on _where_ they want to install it. Chocolatey attempts to find and report this installation location, but due to many factors, including the underlying Operating System, this isn't always possible.
With regard to this (where I am assuming you meant upgrade, and not update):
choco upgrade all
My expectation is that all packages that are currently outdated on the machine would be updated, based on what packages are available from my configured sources. I would also expect that if there were any problems with the installation of those packages upgrades, that this would be reported.
Now, in terms of what happens with the underlying application, that is completely dependent on what the package maintainer (as @mkevenaar has pointed out) has decided to do. Does that make sense?
Dear @gep13 ,
First of all thanks for your patience and kind reply. Some of the points you mentioned are actually a continuation of the discussions about the installation path on this feature request and this complaint report.
To be sure that I have a good understanding of what Chocolatey is, it is kind of an API to standardize all software installations on Windows. So the user can install and update/upgrade the software/packages through one interface. To my best understanding, Chocolatey leaves the quality test, installation path, uninstallation, upgrading ... to the software itself or the package maintainer. And this is the part I think which is causing a lot of problem in my opinion. I think all software/packages installed via Chocolatey must be placed in one standard place different from the Windows "Program files", the upgrading process should uninstall the previous version (while keeping the user data/settings safe).
I used to have almost all of my FLOSS installed via Chocolatey, but after a while, I realized I have 6-7 different versions of Python on my computer. Same thing for FreeCAD, Julia ... and almost all of the other software. So basically, Chocolatey installs the new versions but keeps the old versions as well. I can understand that standardizing the installation path might be difficult but a clean upgrade should not be difficult.
Hi @Foadsf,
Let's get some terminology right:
Package: A Chocolatey package. This contains metadata and, optionally, scripts that get triggered during specific events.Package maintainer: A person or organisation that, in case of the Chocolatey.org Community Repository, volunteered to submit their created package to an central location for other to use.Software: A piece of software, that in most cases is not created by Chocolatey.Software Installer: A tool or script, most likely provided by the software developer, that installs the SoftwareAs @gep13 already explained, Chocolatey upgrades (or installs) the _package_ in a consistent, clean way. It moves the old package to the lib-bkp folder and puts the new package in the lib folder. It will then trigger, if available, the scripts shipped with that package. Depending on the outcome of those scripts, the package installation or upgrade can fail or success. If it failed, the package is put in lib-bad folder.
For more information about how Chocolatey works, please have a look at the documentation
What happens inside the script is up to the _Package Maintainer_, not Chocolatey, or the choco.exe tool.
Depending on the type of package, the software installer may or may not clean-up old versions of the software. That is totally up to the software developer, and not in any way the responsibility of Chocolatey.
I would kindly request you to contact the _package maintainer_ of the packages you are having troubles with and ask them if they are willing to cleanup the older versions of the _software_.
Most helpful comment
@Foadsf I wanted to follow up here with regard to this issue, and also some of the tweets that you have sent recently at well.
The first thing that I want to clarify is "what" Chocolatey is. Chocolatey is a Package Manager for Windows. It manages packages. Those packages can/do install applications onto the Windows machine, and Chocolatey provides some helper methods to help with this endeavour.
So, for example, when you say this:
https://twitter.com/fsfarimani/status/1244570106551848960
I need to make sure that we are talking about the same thing. The installation path of the
packageis _always` the same, this never changes. Where the package maintainer decides to install the application to is dependent on _where_ they want to install it. Chocolatey attempts to find and report this installation location, but due to many factors, including the underlying Operating System, this isn't always possible.With regard to this (where I am assuming you meant upgrade, and not update):
My expectation is that all packages that are currently outdated on the machine would be updated, based on what packages are available from my configured sources. I would also expect that if there were any problems with the installation of those packages upgrades, that this would be reported.
Now, in terms of what happens with the underlying application, that is completely dependent on what the package maintainer (as @mkevenaar has pointed out) has decided to do. Does that make sense?