Ways to Install or Uninstall curl on Ubuntu 22.04

Updated: October 8, 2022

curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. I will show you how to install curl on Ubuntu 22.04 in this guide.

Prerequisites

  • Operating system: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Ascertain that you are able to execute sudo commands.

Prerequisites to install curl on Ubuntu 22.04

Install curl Ubuntu 22.04

curl 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 curl 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 steps to install curl on your Ubuntu 22.04.

Step 1: Obtain new packages from Ubuntu by updating the APT database. Opening the terminal and executing this Linux command:

sudo apt -y update

Step 2: Start installing the packages on Ubuntu 22.04. After updating the system, you can install curl Ubuntu by executing this command in the terminal.

sudo apt -y install curl

Install curl using Aptitude

You must run this command to install Aptitude if you haven’t already done so on Ubuntu.

sudo apt -y install aptitude

After installing, you can now install curl, 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 fetch 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 the system, you can install curl Ubuntu by pasting this command into the terminal and executing it.

sudo aptitude install curl

Uninstall curl on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu might be challenging? You’re wrong; any program, not just a curl, can be easily uninstalled by anyone.

If you installed curl using APT or Aptitude, you could uninstall curl on Ubuntu by executing this command

sudo apt remove --auto-remove curl

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

sudo apt autoremove --purge curl

Summary

In this tutorial, I showed you ways to install curl on Ubuntu 22.04 and some ways to uninstall curl too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.