How to Install and Uninstall g++ Package on Ubuntu 22.04 LTS (Jammy Jellyfish)
Last updated: January 11,2025
Notice
You can also install and uninstall the g++ on the following distributions in the same way, as they are all based on the Ubuntu system
- Kubuntu 22.04 LTS
- Lubuntu 22.04 LTS
- Xubuntu 22.04 LTS
- Ubuntu MATE 22.04 LTS
- Ubuntu Studio 22.04 LTS
- Pop!_OS 22.04 LTS
- Zorin OS 16 / Zorin OS 17
- Ubuntu Budgie 22.04
1. Install "g++" package
Here is a brief guide to show you how to install g++ on Ubuntu 22.04 LTS (Jammy Jellyfish)
$
sudo apt update
Copied
$
sudo apt install
g++
Copied
2. Uninstall "g++" package
In this section, we are going to explain the necessary steps to uninstall g++ on Ubuntu 22.04 LTS (Jammy Jellyfish):
$
sudo apt remove
g++
Copied
$
sudo apt autoclean && sudo apt autoremove
Copied
3. Information about the g++ package on Ubuntu 22.04 LTS (Jammy Jellyfish)
Package: g++
Architecture: amd64
Version: 4:11.2.0-1ubuntu1
Priority: optional
Section: devel
Source: gcc-defaults (1.193ubuntu1)
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian GCC Maintainers
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 16
Provides: c++-compiler, g++-x86-64-linux-gnu (= 4:11.2.0-1ubuntu1)
Depends: cpp (= 4:11.2.0-1ubuntu1), gcc (= 4:11.2.0-1ubuntu1), g++-11 (>= 11.2.0-1~), gcc-11 (>= 11.2.0-1~)
Suggests: g++-multilib
Filename: pool/main/g/gcc-defaults/g++_11.2.0-1ubuntu1_amd64.deb
Size: 1412
MD5sum: 127337edec010d07a97edc6e40d99fee
SHA1: 882f7a2a389a829715aad77774b752fa4feb92c1
SHA256: 693080e6d1648f521183c1fa5fcfdd2d357a87f5872511ec12792d9dfe1effdb
SHA512: a5153251990f554fd7891fe974ea602cf00f0a800542bedc2db1386122112d009d0d2b664103fdc7ce90651b9450b423bd7de82ee2ffd1c6b20864276c19e85a
Description: GNU C++ compiler
Description-md5: 4d44b18774ae5123b7c3f70d940cf655
Task: ubuntustudio-video, ubuntustudio-publishing, ubuntu-mate-core, ubuntu-mate-desktop
Build-Essential: yes
Architecture: amd64
Version: 4:11.2.0-1ubuntu1
Priority: optional
Section: devel
Source: gcc-defaults (1.193ubuntu1)
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian GCC Maintainers
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 16
Provides: c++-compiler, g++-x86-64-linux-gnu (= 4:11.2.0-1ubuntu1)
Depends: cpp (= 4:11.2.0-1ubuntu1), gcc (= 4:11.2.0-1ubuntu1), g++-11 (>= 11.2.0-1~), gcc-11 (>= 11.2.0-1~)
Suggests: g++-multilib
Filename: pool/main/g/gcc-defaults/g++_11.2.0-1ubuntu1_amd64.deb
Size: 1412
MD5sum: 127337edec010d07a97edc6e40d99fee
SHA1: 882f7a2a389a829715aad77774b752fa4feb92c1
SHA256: 693080e6d1648f521183c1fa5fcfdd2d357a87f5872511ec12792d9dfe1effdb
SHA512: a5153251990f554fd7891fe974ea602cf00f0a800542bedc2db1386122112d009d0d2b664103fdc7ce90651b9450b423bd7de82ee2ffd1c6b20864276c19e85a
Description: GNU C++ compiler
Description-md5: 4d44b18774ae5123b7c3f70d940cf655
Task: ubuntustudio-video, ubuntustudio-publishing, ubuntu-mate-core, ubuntu-mate-desktop
Build-Essential: yes