How To Install grub2-common on Ubuntu 20.04

In this tutorial we learn how to install grub2-common on Ubuntu 20.04. grub2-common is GRand Unified Bootloader (common files for version 2) GRand Unified Bootloader (common files for version 2)

Introduction

In this tutorial we learn how to install grub2-common on Ubuntu 20.04.

What is grub2-common

grub2-common is:

This package contains common files shared by the distinct flavours of GRUB. The files in this package are specific to GRUB 2, and would break GRUB Legacy if installed on the same system. Task: ubuntu-live, kubuntu-live, xubuntu-live, lubuntu-live, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-live, ubuntu-mate-live, ubuntu-budgie-live

Package: grub2-common Architecture: amd64 Version: 2.04-1ubuntu26 Multi-Arch: foreign Priority: optional Section: admin Source: grub2 Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: GRUB Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1310 Depends: grub-common (= 2.04-1ubuntu26), dpkg (>= 1.15.4) | install-info, libc6 (>= 2.28), libdevmapper1.02.1 (>= 2:1.02.36), libefiboot1 (>= 37), libefivar1 (>= 37), liblzma5 (>= 5.1.1alpha+20120614) Conflicts: grub-legacy Breaks: grub (« 0.97-54), grub-cloud-amd64 (« 0.0.4), grub-coreboot (« 2.02+dfsg1-7), grub-doc (« 0.97-29ubuntu60), grub-efi-amd64 (« 2.02+dfsg1-7), grub-efi-arm (« 2.02+dfsg1-7), grub-efi-arm64 (« 2.02+dfsg1-7), grub-efi-ia32 (« 2.02+dfsg1-7), grub-efi-ia64 (« 2.02+dfsg1-7), grub-ieee1275 (« 2.02+dfsg1-7), grub-legacy-doc (« 0.97-29ubuntu60), grub-pc (« 2.02+dfsg1-7), grub-uboot (« 2.02+dfsg1-7), grub-xen (« 2.02+dfsg1-7), grub-yeeloong (« 2.02+dfsg1-7), shim (« 13) Replaces: grub, grub-cloud-amd64 (« 0.0.4), grub-common (« 1.99-1), grub-coreboot (« 2.02+dfsg1-7), grub-doc (« 0.97-29ubuntu60), grub-efi-amd64 (« 2.02+dfsg1-7), grub-efi-arm (« 2.02+dfsg1-7), grub-efi-arm64 (« 2.02+dfsg1-7), grub-efi-ia32 (« 2.02+dfsg1-7), grub-efi-ia64 (« 2.02+dfsg1-7), grub-ieee1275 (« 2.02+dfsg1-7), grub-legacy, grub-legacy-doc (« 0.97-29ubuntu60), grub-pc (« 2.02+dfsg1-7), grub-uboot (« 2.02+dfsg1-7), grub-xen (« 2.02+dfsg1-7), grub-yeeloong (« 2.02+dfsg1-7) Filename: pool/main/g/grub2/grub2-common_2.04-1ubuntu26_amd64.deb Size: 589024 MD5sum: 8eb09cf5c41f74ad07071b5932255fd8 SHA1: 4b963b72269a768467794953997224afbc3f823f SHA256: 02b74290aede12026e94b08fc3fcc3ab896e11a50aa732af5e3a37850f177803 Homepage: https://www.gnu.org/software/grub/ Description-en: GRand Unified Bootloader (common files for version 2) This package contains common files shared by the distinct flavours of GRUB. The files in this package are specific to GRUB 2, and would break GRUB Legacy if installed on the same system. Task: ubuntu-live, kubuntu-live, xubuntu-live, lubuntu-live, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-live, ubuntu-mate-live, ubuntu-budgie-live

There are three methods to install grub2-common on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install grub2-common Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install grub2-common using apt-get by running the following command:

sudo apt-get -y install grub2-common

Install grub2-common Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install grub2-common using apt by running the following command:

sudo apt -y install grub2-common

Install grub2-common Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install grub2-common using aptitude by running the following command:

sudo aptitude -y install grub2-common

How To Uninstall grub2-common on Ubuntu 20.04

To uninstall only the grub2-common package we can use the following command:

sudo apt-get remove grub2-common

Uninstall grub2-common And Its Dependencies

To uninstall grub2-common and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove grub2-common

Remove grub2-common Configurations and Data

To remove grub2-common configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge grub2-common

Remove grub2-common configuration, data, and all of its dependencies

We can use the following command to remove grub2-common configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge grub2-common

References

Summary

In this tutorial we learn how to install grub2-common package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.