Skip to content

Version Switching Guide

Juan Diego González edited this page Sep 14, 2021 · 7 revisions

Version Switching

The GA'd v7 cf CLI binary is named cf7, and there is a symlink from cf -> cf7.


The GA'd v8 cf CLI binary is named cf8, and there is a symlink from cf -> cf8. Workflows that require switching between different versions of CLI can be scripted to accommodate utilizing binaries of the same name on a single computer.

Below you'll find instructions for each of the package managers we support.

Note: All the instructions described bellow can be done with any pair of versions. For example:

  • v6 and v7
  • v7 and v8
  • v6 and v8.

Switching CLI versions Using Brew

  • Assuming you've installed both wanted versions e.g. v6 and v7...
    • brew install cf-cli@7
    • brew install cf-cli@6
  • Switch from v6 to v7:
    • brew unlink cf-cli@6 && brew unlink cf-cli@7 && brew link cf-cli@7 && cf version
  • Switch from v7 to v6:
    • brew unlink cf-cli@7 && brew unlink cf-cli@6 && brew link cf-cli@6 && cf version

Switching CLI versions Using Yum or Apt

We're working on a robust soluiton that will faciliate more seamless switching via these package managers, but for now you must uninstall one version of the CLI and install the other version of the CLI to switch between them.

  • Currently on v6, want to switch to v7:
    • yum: sudo yum remove cf-cli && sudo yum install cf7-cli && cf version
    • apt: sudo apt-get remove cf-cli && sudo apt-get install cf7-cli && cf version
  • Currently on v7, want to switch to v6:
    • yum: sudo yum remove cf7-cli && sudo yum install cf-cli && cf version
    • apt: sudo apt-get remove cf7-cli && sudo apt-get install cf-cli && cf version

Switching CLI Versions Pulled via GitHub or CLAW

The following is a simple approach:

  • Download the v6 and v7 binaries into separate directories
  • Write a scipt that updates your PATH so it points to the binary for the version of the CLI you need to run:
    • export PATH=/path/to/your/v6-or-v7/binary/:$PATH