How to Install and Uninstall g++-12 Package on Debian 12 (Bookworm)

Last updated: May 22,2024

1. Install "g++-12" package

This tutorial shows how to install g++-12 on Debian 12 (Bookworm)

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

2. Uninstall "g++-12" package

Please follow the instructions below to uninstall g++-12 on Debian 12 (Bookworm):

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

3. Information about the g++-12 package on Debian 12 (Bookworm)

Package: g++-12
Source: gcc-12
Version: 12.2.0-14
Installed-Size: 36161
Maintainer: Debian GCC Maintainers
Architecture: amd64
Provides: c++-compiler, c++abi2-dev
Depends: gcc-12-base (= 12.2.0-14), gcc-12 (= 12.2.0-14), libstdc++-12-dev (= 12.2.0-14), libc6 (>= 2.36), libgmp10 (>= 2:6.2.1+dfsg1), libisl23 (>= 0.15), libmpc3 (>= 1.1.0), libmpfr6 (>= 3.1.3), libzstd1 (>= 1.5.2), zlib1g (>= 1:1.1.4)
Suggests: g++-12-multilib, gcc-12-doc (>= 12)
Description: GNU C++ compiler
Description-md5: 0a3fad3367cb994bd16c61b0e16a8b9c
Homepage: http://gcc.gnu.org/
Section: devel
Priority: optional
Filename: pool/main/g/gcc-12/g++-12_12.2.0-14_amd64.deb
Size: 10694356
MD5sum: c7ddaa4c1a2490b837c9ee95198bc9d7
SHA256: 097a2cb520881c29afa97c1bb0c381ce008aef362df2779677416a0981bcf165