This is a follow up question to How to install gcc-7 or clang 4.0?.
Following the answers therein, I was able to install gcc-7.2 by:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install -y gcc-7
However, after the install, the
g++ command still defaults to
gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
Is it possible/safe to have
gcc-7 as the default and remove the old gcc-5.x files entirely?
Note that, different from the said duplicate, I'm looking to remove/replace gcc-5.x instead of setting a symlink.