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

Last updated: May 20,2024

1. Install "gcc-12" package

Please follow the guidelines below to install gcc-12 on Debian 12 (Bookworm)

$ sudo apt update $ sudo apt install gcc-12

2. Uninstall "gcc-12" package

Here is a brief guide to show you how to uninstall gcc-12 on Debian 12 (Bookworm):

$ sudo apt remove gcc-12 $ sudo apt autoclean && sudo apt autoremove

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

Package: gcc-12
Version: 12.2.0-14
Installed-Size: 68236
Maintainer: Debian GCC Maintainers
Architecture: amd64
Replaces: cpp-12 (<< 7.1.1-8)
Provides: c-compiler
Depends: cpp-12 (= 12.2.0-14), gcc-12-base (= 12.2.0-14), libcc1-0 (>= 12.2.0-14), binutils (>= 2.39.90.20230104), libgcc-12-dev (= 12.2.0-14), libc6 (>= 2.36), libgcc-s1 (>= 3.0), libgmp10 (>= 2:6.2.1+dfsg1), libisl23 (>= 0.15), libmpc3 (>= 1.1.0), libmpfr6 (>= 3.1.3), libstdc++6 (>= 5), libzstd1 (>= 1.5.2), zlib1g (>= 1:1.1.4)
Recommends: libc6-dev (>= 2.23-1~)
Suggests: gcc-12-multilib, gcc-12-doc (>= 12), gcc-12-locales (>= 12)
Description: GNU C compiler
Description-md5: 394374e688b1afb3af5f419895d29698
Homepage: http://gcc.gnu.org/
Section: devel
Priority: optional
Filename: pool/main/g/gcc-12/gcc-12_12.2.0-14_amd64.deb
Size: 19266936
MD5sum: 317ab1bd8923a0dc5f0610184add33ac
SHA256: 54f7a9e77c6b12bafa07ffb1d4c42933a416748119f169514c1ed1119d51f4b3