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

Last updated: May 20,2024

1. Install "g++" package

Please follow the guidance below to install g++ on Debian 12 (Bookworm)

$ sudo apt update $ sudo apt install g++

2. Uninstall "g++" package

This guide let you learn how to uninstall g++ on Debian 12 (Bookworm):

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

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

Package: g++
Source: gcc-defaults (1.203)
Version: 4:12.2.0-3
Installed-Size: 14
Maintainer: Debian GCC Maintainers
Architecture: amd64
Provides: c++-compiler, g++-x86-64-linux-gnu (= 4:12.2.0-3)
Depends: cpp (= 4:12.2.0-3), gcc (= 4:12.2.0-3), g++-12 (>= 12.2.0-1~), gcc-12 (>= 12.2.0-1~)
Suggests: g++-multilib
Description: GNU C++ compiler
Description-md5: 4d44b18774ae5123b7c3f70d940cf655
Build-Essential: yes
Tag: devel::compiler, devel::lang:c, devel::lang:c++, devel::library,
implemented-in::c, interface::commandline, role::devel-lib,
role::dummy, role::metapackage, role::program, suite::gnu,
works-with::software:source
Section: devel
Priority: optional
Filename: pool/main/g/gcc-defaults/g++_12.2.0-3_amd64.deb
Size: 1356
MD5sum: ee1214564633e8a0ec102e218b4c66ca
SHA256: 26c451a660728cf7c15548a281e17eef2f36fab28499371e83fc2d3accb499d7