How to downgrade cmake / manage versions

Newb questions [1]

  • How do I remove cmake version x and downgrade to version y?

  • How to manage cmake versions on different linux distributions?

  1. I installed the latest version of cmake - 3.27.0-rc4 [2]. I’d like to go back a few versions and install an earlier version. It is as simple as repeating the install with 3.17.x? Or will that break things.

  2. We have a mix of developer workstations (redhat and ubuntu). They come with different cmake versions. For complicated reasons I was asked to standardize on ‘the’ version currently used by our runners, and that version is not available in the distro’s repository.

  3. I don’t mind telling them ‘download and compile’ [2] but if there is a utility that allows one to hop between versions, that would be slick.

[1] Long time sysadmin, first time having to worry about specific versions of cmake.

[2] process

You can simply download all the versions you want from the cmake download page and unpack them all into /opt/, they don’t interfere with each other.
To run them, you either set the PATH to one of them or call it explicitely with the full path.

It never occurred to me to ‘just download and run’ - thanks!