How to Install/Upgrade cURL on Ubuntu 22.04 LTS

cURL is a potent tool that can download and upload files. It has an easy-to-use interface, but it does require some getting accustomed to on the command line side of things if you don’t want your experience with this software limited by how much time you spend educating yourself about using curl’s features before realizing their potential in helping make systems more efficient!

In the following tutorial, you will learn how to install the latest version of the cURL package using a well-known LaunchPAD PPA that provides the latest version for Ubuntu 22.04 LTS Jammy Jellyfish using the command line terminal.

Update Ubuntu

Before proceeding with the tutorial, it is good to ensure your system is up-to-date with all existing packages.

sudo apt update && sudo apt upgrade -y

Install Required Packages

The following dependencies will need to be installed to install cURL successfully. Most of these packages would already be present on your system, but running the command can help ensure they’re installed.

sudo apt install software-properties-common apt-transport-https curl -y

If you skip and encounter issues, return and just run the command.

Install/Upgrade cURL – Latest Version

As mentioned at the start of the tutorial, cURL comes packaged on Ubuntu, but you may require a newer version in time.

First, find out what version is installed on your system if you have it already. Users without CURL can skip this.

curl --version

Example output:

How to Install/Upgrade CURL on Ubuntu 22.04 LTS

Import the CURL PPA by Rob Savoury using the following command.

sudo add-apt-repository ppa:savoury1/curl34 -y

Next, run an APT update to reflect the newly added PPA.

sudo apt update

Now, for users that have installed CURL previously, an upgrade will appear. Still, I would advise just to re-run the installation command that will cover both existing setups and new installations.

sudo apt install curl -y

Next, verify the version.

curl --version

Example output:

How to Install/Upgrade CURL on Ubuntu 22.04 LTS

As mentioned above, you have successfully upgraded cURL from 7.81.0 to 7.82.0. Given that at the time of the tutorial Jammy Jellyfish has just been released, in time, the gap will widen.

How to Update/Upgrade cURL

The most effective method for checking for updates is using the terminal. Even if you have set up automatic updates, run the following command every so often to ensure updates are being processed correctly.

sudo apt update && sudo apt upgrade

How to Remove (Uninstall) cURL

For users that wish to revert to the original version of cURL. First, you need to remove the existing package.

sudo apt autoremove curl -y

Next, remove the PPA by adding the –remove flag to the original command.

sudo add-apt-repository ppa:savoury1/curl34 --remove -y

Next, run an APT update.

sudo apt update

Now you can re-install cURL if so desired from the Ubuntu default repository.

Comments and Conclusion

In the small tutorial, you have learned how to install the latest cURL version on Ubuntu 22.04 LTS Jammy Jellyfish.

If you are looking for a versatile and powerful file transfer tool, curl is worth checking out. Its wide range of supported protocols can be used to download or upload files on just about any server. While the command-line interface may take some time, curl can be a precious asset in your Linux or Unix-based system toolkit once you’ve mastered it.



Follow LinuxCapable.com!

Like to get automatic updates? Follow us on one of our social media accounts!