How to uninstall C++ on Linux
Hello, Coders! In this C++ tutorial, we will discuss the steps to uninstall the C++ setup from a Linux system. Before dive into the main topic, let’s briefly discuss what does it mean to uninstall the C++ from a system.
To run a C++ program in a Linux distro like Ubuntu, Red Hat, Fedora, Arch Linux, etc we need the GCC the GNU C++, and C compiler in our System.
By configuring different types of IDE with the C++ compiler, we can easily run any C++ program easily. Uninstalling this C++ setup is as easy as the installation process, which can be done by using the command line interface of the Linux system.
Uninstalling C++ in various Linux Distros
Uninstall C++ Debian Based Linux Distro
To uninstall C++ in Debian-based Linux distributions like Linux Mint, Ubuntu, Kali Linux, Parrot OS we will use the apt-get command-line tool.
Step1: Check whether the gcc compiler is available in your system or not by using which
command.
[email protected]:~$ which gcc
Output:
/usr/bin/gcc
Step2: Remove gcc from the system using apt-get.
[email protected]:~$ sudo apt-get remove gcc
output:
Alternative: Remove the dependencies and gcc configuration also by the following command.
[email protected]:~$ sudo apt-get purge gcc
output:
Uninstall C++ Arch Linux Based Linux Distro
To uninstall C++ in Arch Linux-based Linux distributions like Manjaro, Garuda Linux we will use the pacman command-line tool.
Step1: Check whether the gcc compiler is available in your system or not by using which
command.
[email protected]:~$ which gcc
Output:
/usr/bin/gcc
Step2: Remove the gcc from the system using pacman.
[email protected]:~$ sudo pacman -R gcc
output:
Alternative: Remove the dependencies and gcc configuration also by the following command.
[email protected]:~$ sudo pacman -Rsc gcc
output:
Fedora Based Linux Distro
To uninstall C++ in Fedora-based Linux distributions like Fedora spins, Ubuntu, Qubes OS, ClearOS we will use the dnf/rpm command-line tool.
Step1: Check whether the gcc compiler is available in your system or not by using which
command.
[email protected]:~$ which gcc
Output:
/usr/bin/gcc
Step2: Remove gcc from the system using dnf.
[email protected]:~$ sudo dnf remove gcc
Output:
Hope this tutorial has helped you to understand how we can remove or uninstall C++ from a Linux system.
Happy Coding!!
You can also read, Find MAC address of Linux Device in C++
Leave a Reply