How to Install and Uninstall g++ Package on Ubuntu 16.04 LTS (Xenial Xerus)

Last updated: May 14,2024

1. Install "g++" package

This is a short guide on how to install g++ on Ubuntu 16.04 LTS (Xenial Xerus)

$ sudo apt update $ sudo apt install g++

2. Uninstall "g++" package

Please follow the guidelines below to uninstall g++ on Ubuntu 16.04 LTS (Xenial Xerus):

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

3. Information about the g++ package on Ubuntu 16.04 LTS (Xenial Xerus)

Package: g++
Priority: optional
Section: devel
Installed-Size: 16
Maintainer: Ubuntu Developers
Original-Maintainer: Debian GCC Maintainers
Architecture: amd64
Source: gcc-defaults (1.150ubuntu1)
Version: 4:5.3.1-1ubuntu1
Provides: c++-compiler
Depends: cpp (>= 4:5.3.1-1ubuntu1), gcc (>= 4:5.3.1-1ubuntu1), g++-5 (>= 5.3.1-3~), gcc-5 (>= 5.3.1-3~)
Suggests: g++-multilib
Filename: pool/main/g/gcc-defaults/g++_5.3.1-1ubuntu1_amd64.deb
Size: 1504
MD5sum: 0c03d113ff00ebc960f294420e60855b
SHA1: 7e276ed06d59a18ccc510dacf54c6ef373b6ff32
SHA256: a4fc7ed5501b165ba7e7aaacb24ae9bcdb2d36a364d6bda6f640217bf62a9f33
Description-en: GNU C++ compiler
This is the GNU C++ compiler, a fairly portable optimizing compiler for C++.
.
This is a dependency package providing the default GNU C++ compiler.
Description-md5: 4d44b18774ae5123b7c3f70d940cf655
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Build-Essential: yes
Origin: Ubuntu
Supported: 5y
Task: ubuntu-desktop, ubuntu-usb, edubuntu-desktop, edubuntu-usb, ubuntustudio-audio, ubuntukylin-desktop