うちのいぬ Tech Blog

Tech Blog of Uchinoinu/My dog

How to upgrade fvm itself. If you feel your fvm is old...

If you feel flutter version management tool fvm, you may sometimes verions listed at fvm versionsare old. If so, you can upgrade fvm itself by pub global activate fvm .

This article covers...

  • How to upgrade fvm
  • How to get latest flutter by fvm

By this article, you can ...

  • You can upgrade fvm at your command
  • You can use latest flutter using fvm

This article is for...

  • MacOS user
  • Flutter app developer
  • fvm user

Steps

check current fvm

$ fvm versions
...
Apr 15 21  │ 2.2.0-10.1.pre
Apr 15 21  │ 2.2.0-10.1.pre
Apr 16 21  │ 2.0.5
Apr 27 21  │ 2.3.0-0.1.pre
Apr 29 21  │ 2.2.0-10.2.pre
Apr 30 21  │ 2.0.6
May 10 21  │ 2.2.0-10.3.pre
May 10 21  │ 2.3.0-1.0.pre
May 18 21  │ 2.2.0
May 18 21  │ 2.3.0-12.1.pre
--------------------------------------
May 19 21  │ 2.2.0             beta
--------------------------------------
--------------------------------------
May 27 21  │ 2.2.1             stable
--------------------------------------
--------------------------------------
May 27 21  │ 2.3.0-16.0.pre    dev
--------------------------------------

Something wrong. Too old. Then try fvm upgrade by pub global activate fvm

Upgrade fvm

$ pub global activate fvm

Package fvm is currently active at version 2.0.6.
Resolving dependencies... (1.7s)
+ args 2.1.1
+ charcode 1.3.1
+ cli_notify 0.0.3
+ cli_util 0.3.3
+ collection 1.15.0
+ console 4.1.0
+ date_format 2.0.2
+ fvm 2.2.2
+ io 1.0.3
+ meta 1.7.0
+ path 1.8.0
+ process_run 0.12.1+1
+ pub_semver 2.0.0
+ source_span 1.8.1
+ string_scanner 1.1.0
+ synchronized 3.0.0
+ term_glyph 1.2.0
+ tint 2.0.0
+ vector_math 2.1.0
+ yaml 3.1.0
Downloading fvm 2.2.2...
Downloading cli_notify 0.0.3...
Downloading process_run 0.12.1+1...
Downloading io 1.0.3...
Downloading cli_util 0.3.3...
Precompiling executables... (3.1s)
Precompiled fvm:main.
Installed executable fvm.
Activated fvm 2.2.2.

confirm new version

$ fvm --version
2.2.2

Retry to check fvm releases

$ fvm releases
...
May 10 21  │ 2.2.0-10.3.pre
May 10 21  │ 2.3.0-1.0.pre
May 18 21  │ 2.2.0
May 18 21  │ 2.3.0-12.1.pre
May 19 21  │ 2.2.0
May 27 21  │ 2.2.1
May 27 21  │ 2.3.0-16.0.pre
Jun 11 21  │ 2.2.2
Jun 11 21  │ 2.2.2
Jun 17 21  │ 2.3.0-24.0.pre
--------------------------------------
Jun 25 21  │ 2.3.0-24.1.pre    beta
--------------------------------------
--------------------------------------
Jul 1 21   │ 2.2.3             stable
--------------------------------------
Jul 2 21   │ 2.4.0-0.0.pre
--------------------------------------
Jul 13 21  │ 2.4.0-4.0.pre     dev
--------------------------------------

Got you versions!

use a new one!

$ fvm use 2.2.3

Point

  • Remember pub global activate fvm