How to Install and Uninstall parted on Ubuntu 22.04

Updated: September 7, 2022

GNU Parted is a program that allows you to create, destroy, resize, move, and copy disk partitions. This is useful for creating space for new operating systems, reorganizing disk usage, and copying data to new hard disks. I will show you how to install parted on Ubuntu 22.04 in this guide.

Requirements

  • Operating system: parted needs Ubuntu 22.04 to work
  • Privileges: Check that you can run sudo commands.

Prerequisites to install parted on Ubuntu 22.04

Install parted Ubuntu 22.04

parted is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install parted using APT

This is a popular method for installing any Ubuntu packages because it is simple to understand, even if you are a Linux beginner. Following these instructions to get parted on your Ubuntu.

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Opening the terminal and executing this Linux command:

sudo apt-get -y update

Step 2: Start the package installation on Ubuntu 22.04. You can now install parted Ubuntu by executing this command in the terminal.

sudo apt -y install parted

Install parted 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 -y install aptitude

After that, you can now install parted by following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Opening the terminal and executing the following Linux command:

sudo apt-get update

Step 2: Start the package installation on Ubuntu 22.04. After updating the system, you can install parted Ubuntu by pasting this command into the terminal and pressing Enter.

sudo aptitude install parted

Uninstall parted 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.

You can uninstall parted on Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove parted

You can also execute this command if you want to uninstall parted and remove its data and dependencies:

sudo apt autoremove --purge parted

Summary

In this tutorial, I showed you ways to install parted on Ubuntu 22.04 and ways to uninstall parted too. Please contact me if you require any assistance. I’d be delighted to respond.