How to Install and Uninstall g++-12 Package on Ubuntu 24.04 LTS (Noble Numbat)

Last updated: May 18,2024

1. Install "g++-12" package

Please follow the guidelines below to install g++-12 on Ubuntu 24.04 LTS (Noble Numbat)

$ sudo apt update $ sudo apt install g++-12

2. Uninstall "g++-12" package

In this section, we are going to explain the necessary steps to uninstall g++-12 on Ubuntu 24.04 LTS (Noble Numbat):

$ sudo apt remove g++-12 $ sudo apt autoclean && sudo apt autoremove

3. Information about the g++-12 package on Ubuntu 24.04 LTS (Noble Numbat)

Package: g++-12
Architecture: amd64
Version: 12.3.0-15ubuntu1
Priority: optional
Section: universe/devel
Source: gcc-12
Origin: Ubuntu
Maintainer: Ubuntu Core developers
Original-Maintainer: Debian GCC Maintainers
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 37297
Provides: c++-compiler, c++abi2-dev
Depends: gcc-12-base (= 12.3.0-15ubuntu1), gcc-12 (= 12.3.0-15ubuntu1), libstdc++-12-dev (= 12.3.0-15ubuntu1), libc6 (>= 2.38), libgmp10 (>= 2:6.3.0+dfsg), libisl23 (>= 0.15), libmpc3 (>= 1.1.0), libmpfr6 (>= 3.1.3), libzstd1 (>= 1.5.5), zlib1g (>= 1:1.1.4)
Suggests: g++-12-multilib, gcc-12-doc (>= 12)
Filename: pool/universe/g/gcc-12/g++-12_12.3.0-15ubuntu1_amd64.deb
Size: 12096360
MD5sum: ed6866f3b0766cb2ff37b33dcb25c042
SHA1: eccfc2f1c31827ec9169541d1099210ba148427f
SHA256: 2d0e299d4d70f674b6362c384f43259751f07041062d39c367109f52ada323a1
SHA512: 62d04f20602709ee17c53435a478eebf2718c98792d01e788379e26230b2498bff00278a5680959d6981ab048a7e78476b577208f7bce7fc198be455f8debdb1
Homepage: http://gcc.gnu.org/
Description: GNU C++ compiler
Description-md5: 0a3fad3367cb994bd16c61b0e16a8b9c