$ sudo apt purge gcc $ sudo apt-get autoremove $ sudo apt update $ sudo apt upgrade $ sudo apt full-upgrade $ sudo apt install gcc