What is Build Essential Package in Ubuntu & How to Install it?

An essential package is a link to many packages installed as dependencies that are necessary to develop the Ubuntu packages. Installing build-essential packages allows you to install all the necessary related packages.

This guide will elaborate on the build-essential package and how to install it. The post’s content is as follows:

 Let’s start!

What is Build Essential Package in Ubuntu?

The build-essential package is not the software itself, but it contains the dependencies used to help out several packages on Debian-based systems. It is a meta-package necessary to install the related packages or manipulate the programming files. The build-essential package includes this powerful compiling software, which is as follows.

dpkg-devIt contains several development tools required to build and unpack Debian source packages.  
make  This package contains the “makefile”, which gives making/building instructions to the compiler.
gccA compiler used to compile the “C” language in Linux.
g++A compiler for the “C++” programming language.
libc6-dev or libc-dev It contains the necessary development libraries for compiling and processing the C++ and C programming language.

Let’s see how the build essentials can be installed.

Installing the Build Essential Package in Ubuntu

Build essential package has various dependencies; when we install the package, the related dependencies will also be installed. The “Build Essential Package” in Ubuntu 22.04 can be installed using the below-mentioned steps:

Step 1: Update the System Repositories

Before installing the build-essential package, we must update the system to ensure that the latest system packages are installed in the system using the below command: 

$ sudo apt update

Step 2: Install Build Essential Package

To install the available packages in the build-essential package on Ubuntu, run the below command in terminal:

$ sudo apt install build-essential -y

As the build-essential package contains several packages like “g++”, “gcc”, “dpkg-dev”, and“make”. To verify the installation, we will check the version of its dependencies.

Step 3: Verify the Installed Versions

To check the installed version of the “GCC” compiler, run the below-mentioned command:

$ gcc --version

To check the version of the “G++” compiler, use the following command:

$ g++ --version

Removing Build Essential Package in Ubuntu

Build-essential package contains various packages, occupying prominent space in the hard disk. To remove the build-essential package in Ubuntu, use the below-written command:

$ sudo apt remove build-essential -y

If you want to completely remove (including residual packages) the build-essential package in Ubuntu, use the following command:

$ sudo apt autoremove -y

Installing Any Specific Utility From Build Essential Package

If you want to get any specific utility from the list of the build-essential package, then the following table helps you to do so. The commands are provided for each utility included in the build-essential package:

gcc$ apt install build-essential
g++$ sudo apt -y install g++
libc6-dev$ sudo apt install -y libc6-dev
dpkg-dev$ sudo apt install dpkg-dev

Bonus Tip: Install Build Essential Package on Other Linux Distributions

The build-essential package support is available on the most used Linux distributions. Here, the following table offers the commands to install the build-essential package on various Linux distributions other than Debian based:

Linux DistributionCommand
Arch$ sudo pacman -Sy base-devel
CentOS$ sudo dnf group install “Development Tools”
Fedora$ sudo dnf group install “Development Tools” “Development Libraries”
RHEL$ yum groupinstall “Development Tools”

That’s all from this guide!


The build-essential package contains the required dependencies to create the Debian packages. The build-essential package can be installed in Ubuntu using the “sudo apt remove build-essential -y” command. Moreover, to remove the build-essential package, use the “sudo apt remove build-essential -y” command. Apart from this, you have also learned how to install individual utilities of the build-essential package on Ubuntu.