How to Uninstall or Install gdisk on Ubuntu 22.04

Updated: September 6, 2022

GPT fdisk (aka gdisk) is a text-mode partitioning tool that provides utilities for Globally Unique Identifier (GUID) Partition Table (GPT) disks. I will show you how to install gdisk on Ubuntu 22.04 in this tutorial.

Software Requirement

  • OS: gdisk needs Ubuntu 22.04 to work
  • Privileges: Make sure you are able to execute sudo commands.

Prerequisites to install gdisk on Ubuntu 22.04

Install gdisk Ubuntu 22.04

gdisk is one of the popular ways on Ubuntu now so that this tutorial will show you some ways to install it. Choose the one you believe is simple and easy to follow.

Install gdisk using APT

This is one of the popular ways to install any Ubuntu packages because it is simple to understand, even if you are a Linux novice. Following these steps to get gdisk on your Ubuntu 22.04.

Step 1: Update the APT database to download new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt -y update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install gdisk Ubuntu by pasting this command into the terminal and executing it.

sudo apt install gdisk

Install gdisk using Aptitude

Users can manage their installation, upgrade, and removal of packages with Aptitude and view a list of the packages that are currently available. You must run this command to install it if you haven’t already done so on Ubuntu.

sudo apt-get -y install aptitude

After that, you can now install gdisk, just following these steps:

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Launching the terminal and entering the following Linux command:

sudo apt -y update

Step 2: Start the package installation on Ubuntu 22.04. After updating, you can install gdisk Ubuntu by pasting this command into the terminal and executing it.

sudo aptitude install gdisk

Uninstall gdisk on Ubuntu 22.04

Have you ever considered how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone, not just package administrators, can easily uninstall any program.

If you installed gdisk using APT or Aptitude, you could uninstall gdisk on Ubuntu by running this command

sudo apt remove --auto-remove gdisk

To uninstall gdisk and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge gdisk

Conclusion

In this guide, I showed you ways to install gdisk on Ubuntu 22.04 and some ways to uninstall gdisk too. Please do not hesitate to contact me if you require assistance. I’m delighted to respond.