You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show outdated packages versions and upgrade all outdated #749
Thank you for your awesome work. This release is very promising.
But it hasn't at least two important commands.
Yarn v1: yarn outdated - show list outdated packages versions. yarn upgrade - upgrade all minor versions of outdated packages.
I use it very often.
First I run yarn upgrade to update automatically all minor versions. Then I run yarn outdated and already manually update packages to major versions with changing my sources.
I think so workflow use the most part of people who use yarn or npm.
Why is it not implemented?
Even here @arcanis mentioned that outdated is the main command a year ago yet: #546 (comment)
Reacted by Jakob Norlin, Yuping Zuo, Wojciech Maj, Jacob Jewell, Sam Huynh, Žilvinas, Chris Cowan, Danilo Fuchs, Parbez, austinbutler and 7 more
changed the title [-]Show outdated packages version and upgrade all outdated[/-][+]Show outdated packages versions and upgrade all outdated[/+]on Jan 24, 2020
Oh, yes. It works and what I wanted. Thank you very much. But I spent much time while I tried to find the same commands I used in npm and yarn v1.
Would be very good if you added link on this command in the migration article and also mentioned there that it replaces outdated and upgrade all packages.
And maybe it should be added to the Usage section: https://yarnpkg.com/getting-started/usage
because really those commands are very important.
Reacted by Daniel K., cianx, neaucode, Miko, Jason Axelson, Adam Spiers and Webber Takken
@milesj I hadn’t need to search it because those commands I mentioned above worked for me very well in both packages managers. And what do you mean yet? Because it was re-implemented we should wait at least the outdated command?
I don't think upgrade-interactive solves the same use case as outdated does.
In yarn-v1 I regularly use both commands - yarn outdated for a quick scan if there are any packages that need upgrade, and then a couple of rounds of yarn upgrade-interactive to progressively upgrade packages from "guaranteed to not break" to "will probably break something".
Here are three reasons why yarn outdated is still needed:
It is easier to type than yarn upgrade-interactive which is nice for people like me who run yarn outdated several times a day.
It does not capture terminal input and is therefore less abrupt than yarn upgrade-interactive. This behaviour also allows yarn outdated to be combined with other commands, like yarn outdated && yarn start.
It does not show all packages, and is therefore faster to scan. (Why does the new upgrade-interactive show all packages by the way?)
Reacted by Wes Rice, Daniel K., Yuping Zuo, Rob Finbow, Wojciech Maj, M. Ocaña, Philipp Andreychev, Ilya Markov, Timo Schneider, non25 and 60 more
I just upgraded from Yarn v1 to v2. I am surprised that commands akin to yarn outdated and yarn upgrade do not exist. This issue is the only place that I've found addressing the topic, so I'll leave my use case here.
I regularly utilize yarn upgrade for minor and patch upgrades, then run a subsequent yarn outdated to see what major upgrades exist for my projects. I use this as a way of measuring technical debt with the thought that the more major upgrades that exist for my project, the harder it is going to be to maintain the project down the road. At work, I use this as a factor in vouching for feature prioritization. Without yarn upgrade and yarn outdated, I have a much more difficult time doing this.
Is there an expectation that voids like this in Yarn v2 should be filled via plugins?
Reacted by Žilvinas, Ariel Falduto, Marnus Weststrate, Josh Vlk, PikachuEXE, neaucode, Chris Cowan, Shahriar, austinbutler, Reko Jokelainen and 19 more
Oh my. So everyone is going to meet in this closed issue after painfully realizing that outdated doesn't work and docs don't mention any migration path. Same for the list and who knows what else. That's a rather sad approach :/
Also, the new upgrade-interactive is fairly confusing. It's not clear that the first column means no update will happen. And it's ugly as hell on Windows.
But I do like that it allows choosing upgrading minor or major. In the previous iteration, the --latest was somewhat cumbersome.
Reacted by Wojciech Maj, Peter Petrov, Ariel Falduto, Chris Cowan, maggie44, Thomas Marrec, Julius Huck, Adam Spiers, Geoff Greer, Alex and 2 more
Is there a non-interactive way to upgrade all packages that satisfy the current ranges in the package.json? We used to use yarn upgrade to do this.
Reacted by Ryan, PutziSan, Timmy Willison, Tom Kay, Josh Vlk, PikachuEXE, Vijay Aravamudhan, Juraj Moško, Phil Mayfield, Fabian Dietenberger and 4 more
Is there a non-interactive way to upgrade all packages that satisfy the current ranges in the package.json? We used to use yarn upgrade to do this.
Is this possible?
At the moment I find it very difficult to update my packages in a larger workspace. upgrade-interactive shows me about 100 packages (but only 20 at a time and I have to scroll via keyboard arrows), but most of them cannot be upgraded because there is no newer version. The visual selection is very tiring because the lines are very narrow and I often slip in the line. (maybe the UI is only on windows that bad, I don't know)
When I managed to select everything I want, there is often an error (net gone or the files are blocked by the ide), so that nothing is updated and I have to go through the process again.
Heavily missing the Links to the source-packages we had in "outdated"
I generally click on those links and check if they describe any "breaking changes" in their changelog / release messages.
On linux, the navigation isn't smooth. If you move to another line, the whole screen refresh with result in flickering by navigation. You can not move "fast" trough the entries.
Even a bit confusing.. how can that range be higher as the "latest" version?
Reacted by alamothe, pfg, Alexander Lichter, 0xAuwtch, Nicolas Giard, Raman Paulau and Webber Takken
You can always use ncu. It uses yarn (probably old version) and shows outdated packages.
Thanks, this was a great tip. From here it's easy to replicate the old behaviour by adding the following to package.json: scripts: "outdated": "ncu". Still a bit perplexing why this command was removed from yarn.
I just upgrade to Yarn Berry and I'm super confused about this. In my package.json I have dependencies specified by their major version only. Both using yarn up '**' and yarn upgrade-interactive change my package.json and put the exact version number in there. Also, yarn upgrade-interactive is not a good replacement for yarn outdated, since it does not show the currently installed version of the dependencies (only the specified version range), and it also lists packages that are up to date.
I need a command that does the same as yarn upgrade: Install the newest versions of all direct and nested dependencies according to the version ranges specified in package.json, without changing the package.json file.
It seems like what I can do as a workaround right now is delete yarn.lock and then run yarn install again.
@cdauth There is a recursive option for yarn up that does what you are trying to do: update dependencies in your lockfile without updating the manifest (package.json).
@mskelton Thank you, I can confirm that yarn up -R '**' did upgrade everything in the same way that yarn upgrade used to. I must say that I saw this option in the docs but didn't understand its description at all.
Reacted by Evert Harmeling, Jason Adams, Phoenix and Jean-Luc
It seems that -R arbitrarily and magically changes behavior of different yarn commands to be more in line with user expectations 🙂 (same thing with foreach, info, but I also fail to understand the logic)
My 2 cents after reading this long thread:
yarn used to be a drop-in replacement of npm with some nice extra features. Since version 2.0 it is not that thing anymore.
Reacted by Magnus Markling, Seojune Gil, Jefferson Oliveira, emangoro-sc, Brett James, Mica, TheThirdRace, Brent Dearth, Julius Huck, Max Kolodezhnyi and 7 more
You can use glob patterns in it, so for example yarn up "**" would upgrade everything
I tried this and it didn't work as expected. It updated my package.json file which is not what I'm after. I'm only looking to update my yarn.lock file based on the constraints I have listed in package.json.
Is there any command that does that?
The only thing that has worked for me since upgrading to Yarn 2 is deleting the yarn.lock file and running yarn install again.
@rudolfbyker Damn, I think you're right, based on the docs:
If -R,--recursive is set the command will change behavior and no other switch will be allowed. When operating under this mode yarn up will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both yarn up and yarn up -R to cover all bases.
I just tested it and it did exactly what I wanted. Upgrade all packages within the constraints in package.json and only update yarn.lock.
Thank you for pointing this out!
My only complaint now is why the command is so unintuitive. :)
Is there a way to not upgrade major versions with yarn up '**' or yarn up -R '**'? There are a few packages I'm keeping at older versions because the new versions are broken. With yarn upgrade, it ignored the major upgrades.
With yarn up, seems like my options are:
yarn up '**', then individually install the older versions
yarn upgrade-interactive, then press right + down a few dozen times
Option 2 would be easier if yarn upgrade-interactive supported toggling all packages, like with Yarn 1.
Activity
[-]Show outdated packages version and upgrade all outdated[/-][+]Show outdated packages versions and upgrade all outdated[/+]deini commentedon Jan 24, 2020
@MrEfrem have you tried upgrade-interactive ?
MrEfrem commentedon Jan 24, 2020
Oh, yes. It works and what I wanted. Thank you very much. But I spent much time while I tried to find the same commands I used in
npmandyarnv1.Would be very good if you added link on this command in the migration article and also mentioned there that it replaces
outdatedandupgradeall packages.And maybe it should be added to the Usage section: https://yarnpkg.com/getting-started/usage
because really those commands are very important.
milesj commentedon Jan 24, 2020
@MrEfrem FWIW,
upgrade-interactivehas existed in v1 since inception.MrEfrem commentedon Jan 25, 2020
@milesj I hadn’t need to search it because those commands I mentioned above worked for me very well in both packages managers. And what do you mean yet? Because it was re-implemented we should wait at least the outdated command?
jakst commentedon Jan 30, 2020
I don't think upgrade-interactive solves the same use case as outdated does.
In yarn-v1 I regularly use both commands -
yarn outdatedfor a quick scan if there are any packages that need upgrade, and then a couple of rounds ofyarn upgrade-interactiveto progressively upgrade packages from "guaranteed to not break" to "will probably break something".Here are three reasons why
yarn outdatedis still needed:yarn upgrade-interactivewhich is nice for people like me who runyarn outdatedseveral times a day.yarn upgrade-interactive. This behaviour also allowsyarn outdatedto be combined with other commands, likeyarn outdated && yarn start.wesrice commentedon Feb 12, 2020
I just upgraded from Yarn v1 to v2. I am surprised that commands akin to
yarn outdatedandyarn upgradedo not exist. This issue is the only place that I've found addressing the topic, so I'll leave my use case here.I regularly utilize
yarn upgradefor minor and patch upgrades, then run a subsequentyarn outdatedto see what major upgrades exist for my projects. I use this as a way of measuring technical debt with the thought that the more major upgrades that exist for my project, the harder it is going to be to maintain the project down the road. At work, I use this as a factor in vouching for feature prioritization. Withoutyarn upgradeandyarn outdated, I have a much more difficult time doing this.Is there an expectation that voids like this in Yarn v2 should be filled via plugins?
robclancy commentedon Mar 11, 2020
This is super weird :/
danielkcz commentedon Apr 2, 2020
Oh my. So everyone is going to meet in this closed issue after painfully realizing that
outdateddoesn't work and docs don't mention any migration path. Same for thelistand who knows what else. That's a rather sad approach :/Also, the new
upgrade-interactiveis fairly confusing. It's not clear that the first column means no update will happen. And it's ugly as hell on Windows.But I do like that it allows choosing upgrading minor or major. In the previous iteration, the
--latestwas somewhat cumbersome.robrichard commentedon Sep 9, 2020
Is there a non-interactive way to upgrade all packages that satisfy the current ranges in the package.json? We used to use
yarn upgradeto do this.PutziSan commentedon Nov 2, 2020
Is this possible?
At the moment I find it very difficult to update my packages in a larger workspace.
upgrade-interactiveshows me about 100 packages (but only 20 at a time and I have to scroll via keyboard arrows), but most of them cannot be upgraded because there is no newer version. The visual selection is very tiring because the lines are very narrow and I often slip in the line. (maybe the UI is only on windows that bad, I don't know)When I managed to select everything I want, there is often an error (net gone or the files are blocked by the ide), so that nothing is updated and I have to go through the process again.
nicolabello commentedon Nov 17, 2020
@robrichard @PutziSan I think you are looking for https://yarnpkg.com/cli/up
PutziSan commentedon Nov 18, 2020
As far as I know yarn up only works with explicitly naming each dependency.
11 remaining items
xstable commentedon Feb 26, 2022
Heavily missing the Links to the source-packages we had in "outdated"
I generally click on those links and check if they describe any "breaking changes" in their changelog / release messages.
On linux, the navigation isn't smooth. If you move to another line, the whole screen refresh with result in flickering by navigation. You can not move "fast" trough the entries.
Even a bit confusing.. how can that range be higher as the "latest" version?

jkhaui commentedon Mar 5, 2022
Thanks, this was a great tip. From here it's easy to replicate the old behaviour by adding the following to
package.json: scripts:"outdated": "ncu". Still a bit perplexing why this command was removed from yarn.cdauth commentedon Mar 23, 2022
I just upgrade to Yarn Berry and I'm super confused about this. In my
package.jsonI have dependencies specified by their major version only. Both usingyarn up '**'andyarn upgrade-interactivechange mypackage.jsonand put the exact version number in there. Also,yarn upgrade-interactiveis not a good replacement foryarn outdated, since it does not show the currently installed version of the dependencies (only the specified version range), and it also lists packages that are up to date.I need a command that does the same as
yarn upgrade: Install the newest versions of all direct and nested dependencies according to the version ranges specified inpackage.json, without changing thepackage.jsonfile.It seems like what I can do as a workaround right now is delete
yarn.lockand then runyarn installagain.mskelton commentedon Mar 23, 2022
@cdauth There is a recursive option for
yarn upthat does what you are trying to do: update dependencies in your lockfile without updating the manifest (package.json).https://yarnpkg.com/cli/up#options-R%2C-recursive
To use it, just add
-Ror--recursiveas a flag when callingyarn up.cdauth commentedon Mar 23, 2022
@mskelton Thank you, I can confirm that
yarn up -R '**'did upgrade everything in the same way thatyarn upgradeused to. I must say that I saw this option in the docs but didn't understand its description at all.alamothe commentedon Mar 25, 2022
It seems that
-Rarbitrarily and magically changes behavior of differentyarncommands to be more in line with user expectations 🙂 (same thing withforeach,info, but I also fail to understand the logic)arcanis commentedon Mar 25, 2022
If you imagine the commands operate on a tree, by default they'll only run on the roots of these trees. The
-Rflag makes them follow the whole tree.In the case of foreach it's a little special although it's loosely similar, I'd like to re-syntax the cli options to clarify those behaviors.
rohitkandhal commentedon Apr 28, 2022
For me
yarn upgrade-interactivehung up on loading🔨 (yarn): use upgrade-interactive
manast commentedon Aug 18, 2022
My 2 cents after reading this long thread:
yarn used to be a drop-in replacement of npm with some nice extra features. Since version 2.0 it is not that thing anymore.
joshuapinter commentedon Jul 17, 2023
I tried this and it didn't work as expected. It updated my
package.jsonfile which is not what I'm after. I'm only looking to update myyarn.lockfile based on the constraints I have listed inpackage.json.Is there any command that does that?
The only thing that has worked for me since upgrading to Yarn 2 is deleting the
yarn.lockfile and runningyarn installagain.rudolfbyker commentedon Jul 21, 2023
It seems to me like
yarn up -R '**'might be what you want. It's different fromyarn up '**'in two ways:joshuapinter commentedon Jul 21, 2023
@rudolfbyker Damn, I think you're right, based on the docs:
I just tested it and it did exactly what I wanted. Upgrade all packages within the constraints in
package.jsonand only updateyarn.lock.Thank you for pointing this out!
My only complaint now is why the command is so unintuitive. :)
Linksku commentedon Nov 28, 2023
Is there a way to not upgrade major versions with
yarn up '**'oryarn up -R '**'? There are a few packages I'm keeping at older versions because the new versions are broken. Withyarn upgrade, it ignored the major upgrades.With
yarn up, seems like my options are:yarn up '**', then individually install the older versionsyarn upgrade-interactive, then press right + down a few dozen timesOption 2 would be easier if
yarn upgrade-interactivesupported toggling all packages, like with Yarn 1.stefanb2 commentedon Feb 2, 2026
Modern
yarn up --recursive '**'is NOT a full replacement for Classicyarn upgrade:yarn.lockis updatedpackage.jsonis not modifiedyarn upgrade-interactivestill shows the packages with minor/patch upgrades although they are updated in `yarn.lockyarn outdatedwas smarter in this respect: after the upgrade procedure it only showed packages with major upgrades.So there is no other way than to use
yarn upgrade-interactive, manually select the minor/patch updates and accept thatpackage.jsongets modified.