## Note Reference from: [stackoverflow](https://stackoverflow.com/questions/49859457/how-to-reinstall-the-latest-cmake-version) and [Kitware APT Repository](https://apt.kitware.com/). Kitware Inc provides APT repositiory that allows us to install latest CMake via apt-get. ## Steps ### 1. Get Public keys ```bash=Ubuntu sudo apt-get update sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add - ``` ### 2. Add Repository ```bash=Ubuntu # For Ubuntu 18.04 (bionic) sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' # For Ubuntu 16.04 (xenial) sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' # Update list sudo apt-get update ``` ### 3. Install CMake ```bash=Ubuntu sudo apt-get install cmake ```