Repository navigation
Closed
Labels
ExperimentalThis experimental feature can be enabled in settingsIssue-FeatureThis is a feature request for the Windows Package Manager client.
Milestone
Description
As a user I want to be able to use winget to install the most current version of a currently installed program so I don't have to go find it.
Experimental Feature
winget upgrade - displays installed packages with an available upgrade.
winget upgrade -? - displays help for the upgrade command.
winget upgrade --all - upgrades all packages with an available upgrade.
winget upgrade <package> - upgrades the specified package.
Note: upgrade depends on list also being enabled.
winget features - displays all experimental features and their status
winget settings - launches settings.json to configure settings like experimental features
Edited: experimental status
Reacted by Paul Irwin, kengeman, 百地 希留耶, Siddhant Naik, Pavlos Touboulidis, Andrew Oberstar, Fabian Meyertöns, Maximilian Orsley, Marco G, Christian Schulz and 635 more
Reacted by Rudel Saldivar, Herbert Sasshofer, Benoît Jeaurond, Matyas Richter, Erwann Akoka, TiredCisAdmin, StiefelKing, Paul B, Jan1torEarl, Arto Gahr and 48 more
Reacted by Nils Strelow, Pranav Abraham Mathews, Andrei Chirila, Shinigami, Martin Storø Nyfløtt, Benoît Jeaurond, Fredrik Forséll, TiredCisAdmin, Francesco Manghi, StiefelKing and 32 more
Reacted by Michael Currie, Dionysius, Benoît Jeaurond, TiredCisAdmin, Jan1torEarl, Alexandre Zollinger Chohfi, matbee, Dennis Maier, Steven Meyer, Christophe Dervieux and 14 more
Metadata
Metadata
Assignees
Labels
ExperimentalThis experimental feature can be enabled in settingsIssue-FeatureThis is a feature request for the Windows Package Manager client.
Activity
denelon commentedon May 11, 2020
If the command is executed without any parameters, it could update "everything" installed by winget.
jantari commentedon May 19, 2020
I would strongly suggest we stick to the verbs familiar from
apt:One of the very confusing things about package managers are the different syntaxes they use. I don't
speak for everyone, but I genuinely find
pacman,yumanddnfconfusing.zypperis ok.aptis popular and - imo - easy to understand. Introducingupdateas a command that actually starts updating apps would break muscle memory I believeRican7 commentedon May 19, 2020
Yea, agreed. This is what Homebrew (
brew) uses too, so even more prior-art here.khobbits commentedon May 19, 2020
I think we can probably get away from the requirement to have a command to to 'refresh the repositories'. It feels like a little step backwards in time having to refresh apt, compared to yum. Surely the tool can work out if the repositories require updating automatically?
If we need to operate in a cached/offline mode that shouldn't that extreme edge case require a parameter rather than be the default?
As to which verb, update/upgrade? Why not allow the use of both?
despotak commentedon May 19, 2020
I agree with Robert (KHobbits) (@khobbits) that a "refresh the repos" commands is a backward step. I really hope that
wingetdoes not need to manually refresh the repositories before an update.On the other hand, I see jantari's and Trevor N. Suarez (@Rican7)'s PoV. Probably then the solution is somewhere in the middle. Disregard
winget updateand usewinget upgradeas the default command.Another solution might be that
updateis an alias forupgrade(or via versa).seanfisher commentedon May 19, 2020
Agree with Robert (KHobbits) (@khobbits) and Christos Despotakis (@despotak) and just wanted to pitch in that Homebrew automatically
updates when youbrew install,brew upgradeorbrew tap(see the man page and search for AUTO_UPDATE).This seems like the best solution to me.
lordcheeto commentedon May 20, 2020
While it may not be the right option for
winget,aptseparated update and upgrade steps for a reason. Besides not having to update the package list for every operation, it enables it to update the package list on a schedule, run security upgrades automatically, and give notifications in the MOTD when you log in about other packages that can be upgraded, without actually upgrading them.Chocolatey does this with a separate
outdatedcommand.bc3tech commentedon May 20, 2020
glad to see I'm not the only one praying for the love of God keep the
updatevsupgradecomplexity out of Windows. Chocolatey's been just fine w/o it.jaydn commentedon May 21, 2020
update / upgrade is there for a reason. Perhaps you just want to check how much is going to be upgraded - or check the package list for anything that looks risky and do it later? Would be a step backward to not be able to do this imo
0x49D1 commentedon May 21, 2020
Does
wingetwork kind of chocolatey now? Chocolatey has local repository of installed packages, so that it can update them in case I want to all in 1 batch. But in case I'm upgrading already installed package from it's update system - there will be no problem. For nowwingetseems very basic, there is no command to see the already installed packages, so I assume that maybe it just downloads the installers and runs them with default parameters... One of the main reasons of package management for me is also security, I've not found any mentions of how package is checked before it's added to the repository ofwinget.sschuberth commentedon May 21, 2020
So how about all of these (with
upgradebeing an alias forupdateas already suggested):winget updateto update meta-data and upgrade all packageswinget update <package>to update meta-data and upgrade only<package>winget update --only-meta-datato update meta-data only and upgrade no packageswinget update --no-meta-datato upgrade all packages based on local (not updated) meta-datawinget update --no-meta-data <package>to upgrade only<package>based on local (not updated) meta-dataI believe it's also important to be able to list all available updates without actually installing them, but that probably does not require a separate command and can simply be accomplished by a prompt before the actual update / upgrade.
sschuberth commentedon May 21, 2020
What's probably way more difficult than implementing the update command itself is the logic to automatically get the version of programs in order to determine if there is an update available. Many installers / executables do not maintain their embedded "File version" / "Product version", and there simply is no unified way how Windows programs announce their updates or check for updates themselves.
Edit: Looks like I misunderstood how
wingetis supposed to work. It does not even try to determine whether upstream has released a new version, but solely relies on its own meta-data which has to be maintained for each version of a package.crumdev commentedon May 21, 2020
The manifest yaml file that a company has to provide includes the version number in it. This should be easy to find then. Better yet it seems that the way everything is structured that the manifest name itself is the version number under the application folder.
https://github.com/microsoft/winget-pkgs/blob/master/manifests/Anki/Anki/2.1.26.yaml

https://github.com/microsoft/winget-pkgs/tree/master/manifests/Adobe/Brackets

bc3tech commentedon May 21, 2020
which is why chocolatey added
outdated(has already been proposed here). update/upgrade is confusing to literally every person unfamiliar with Linux.82 remaining items
Trance-Paradox commentedon Mar 29, 2021
I have it enabled.

Also newer versions of programs are available
Here is an example
denelon commentedon Mar 29, 2021
#752 Upgrade doesn't work for several packages
pratikpc commentedon Apr 12, 2021
Demitrius Nelon (@denelon) why not just winget upgrade *?
Instead of --all?
denelon commentedon Apr 12, 2021
We haven't implemented "wild cards" like * or ? yet. When we tackle that we will likely have the changes cascade through all of the commands.
emass-sec commentedon Apr 24, 2021
winget upgrade doesn't seem work for many or any packages yet. My test was with VideoLAN.VLCNightly
eidylon commentedon Apr 25, 2021
I've had it be spotty. On my last attempt it told me there were three updates...
But when I try to upgrade them, they have varying results and success.
Arduino IDE:
AutoHotKey successfully installed the update yesterday. Though today it has the same results as the Arduino IDE.
Sql Server SSMS:
So it does work sometimes (e.g. AutoHotKey yesterday), but it is not reliable yet.
Karl-WE commentedon Apr 29, 2021
it can also cause issue or duplicates depending the installer but that's more of a natural reason
Example:
7zip 19.00 installed as msi
instal 77zip 20.x beta via winget will cause a duplicate in settings > apps while files are effectively overwritten.
arcmodo commentedon May 9, 2021
I've used winget upgrade --all multiple times to try and upgrade PowerShell and Calibre, but they aren't actually upgrading despite the results shown below. It downloads the updated installer and runs it, but the installers then disappear and don't actually do the upgrade. Running the upgrade check again shows the same initial results. These packages were installed before the latest version. Do I need to install them again with the new version for the upgrade to work moving forward? I did see a comment above that someone needed to install an older version and then used upgrade.
C:\Users\x>winget upgrade
Name Id Version Available Source
PowerShell Microsoft.PowerShell 7.0.4.0 7.1.3 winget
calibre calibre.calibre 5.6.0 5.17.0 winget
C:\Users\x>winget upgrade --all
Found PowerShell [Microsoft.PowerShell]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/PowerShell-7.1.3-win-x64.msi
██████████████████████████████ 95.0 MB / 95.0 MB
Successfully verified installer hash
Starting package install...
Successfully installed
Found calibre [calibre.calibre]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://calibre-ebook.com/dist/win64
██████████████████████████████ 124 MB / 124 MB
Successfully verified installer hash
Starting package install...
Successfully installed
C:\Users\x>winget upgrade
Name Id Version Available Source
PowerShell Microsoft.PowerShell 7.0.4.0 7.1.3 winget
calibre calibre.calibre 5.6.0 5.17.0 winget
denelon commentedon May 11, 2021
@jrennemeyer we still have a couple of additional pieces of work to address upgrades. One of them is in the next release (checking all manifests for
ProductCode), and the other will be in a future release (installers of one type inside another). I've also been gradually making changes to manifests so that the entries inside of Add / Remove Programs match thePackageNameandPublisher.spragginsdesigns commentedon Jun 13, 2021
I know this is a year old, but I agree. I always have to run sudo apt update -y && sudo apt upgrade -y in Linux distros, and it feels redundant and backward for Winget to do this.
I would love to join this discussion. I will look into what I can do to support and update this repo in my spare time and contribute to something Windows should have had long ago. I am very excited to see this new feature and have everyone at work using it now.
I wish the update/upgrade feature worked adequately right now, though. I will see what I can do on my end to fix/update this issue.
denelon commentedon Jun 14, 2021
@Atmosphere9999 the default "Time To Live (TTL)" for the cache is five minutes. It is configurable in settings. As long as the machine has access to the PreIndexed source package, it should refresh on it's own when any command depending on the source is executed.
Most of the challenges related to the update command are related to installers with different metadata in the manifest and the entries the installers add to Add / Remove Programs. We have several work items to improve matching the meta-data and the associated experience with
winget upgrade.