5

Where can I find a command line tool for searching and listing installed packaged versions and available upgrade versions?

I can't think of any other package management tool that doesn't include commands to list installed versions or find available upgrades without actually upgrading.

For example, if my pubspec.yaml restricts a version, there is no easy way to check which of my pinned packages could be upgraded if I lift the restriction. Similarly, it might be possible to see what versions of a particular package may be available at the command line.

I'd prefer to use a command line tool because it is a vastly faster workflow than needing to check a website for every package you might be using or have inherited via a dependency.

Brendon Whateley
  • 1,302
  • 13
  • 22

3 Answers3

8

You can use flutter pub deps command to list all package information including their versions.

Utku A.
  • 738
  • 8
  • 8
  • But this doesn't actually show all the versions - it looks like it only shows direct dependency versions, but not the version of the things those dependencies rely on – claudekennilol Aug 25 '23 at 15:07
1

On May 6, the command flutter pub outdated has been introduced with the release of Dart 2.8. It shows the current and upgradable versions of the packages imported.

If it doesn't work, update your Flutter version with flutter upgrade.

MickaelHrndz
  • 3,604
  • 1
  • 13
  • 23
  • It only seems to show things that could be upgraded. And it doesn't work if you have a problem that listing dependencies might help with: `The pubspec.yaml file has changed since the pubspec.lock file was generated, please run "pub get" again.` – Brendon Whateley May 18 '20 at 16:07
  • Isn't that what you asked ? And I didn't understand the 2nd part of your comment, but if the lockfile is blocking you, delete it or run `pub upgrade`. – MickaelHrndz May 18 '20 at 17:07
  • `outdated` only seems to report on specific packages that can be upgraded. And it only works if you can successfully run `pub get` which I couldn't because something got upgraded that created a conflict in dependancies. If I could have simply listed all available versions of packages I had installed, I could have easily figured out the problem instead of needing to search the web to find down-grade version numbers. – Brendon Whateley May 20 '20 at 22:22
  • This part is the part you missed. "listing installed packaged versions" -- sorry that I wasn't clearer in my question. – Brendon Whateley May 20 '20 at 22:23
1

The Dart package manager is a very limited in functionality software product (this is a well-known fact).
For this reason, you may not find the functionality that you expect from such software.

mezoni
  • 10,684
  • 4
  • 32
  • 54