Install/Upgrade cURL on Ubuntu 22.04 LTS
If you’re hitting “unsupported protocol” errors or need TLS 1.3 for a new API, the stock cURL that ships with Jammy might not cut it. In this guide I’ll show you how to pull a newer build from a trusted Launchpad PPA and get your terminal back in shape.
Why the bundled version often isn’t enough
The Ubuntu 22.04 repositories freeze package versions at release time. That means the cURL you get out‑of‑the‑box may lack recent security patches or support for modern protocols like HTTP/2. I ran into this last month when a CI script started failing after the remote service upgraded to TLS 1.3 only – the old cURL simply refused to connect.
Add a reliable PPA
A Personal Package Archive lets you install newer builds without compiling from source. The “curl‑team” PPA is maintained by the upstream developers, so you’re not pulling in some random, bloated fork.
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:curl/curl
Why it matters: software-properties-common gives you the add-apt-repository command; without it the PPA step would fail. Adding the PPA registers its package list with APT, so the next apt update knows where to fetch the newer cURL binaries.
Install (or upgrade) to the latest build
Now that the new repository is in place, ask APT for the freshest version:
sudo apt update
sudo apt install -y curl
If you already have cURL installed, this command will replace the old package with the one from the PPA. You can confirm what’s happening by adding -V to see the version that will be pulled.
Why it matters: Running apt update again clears any stale metadata; otherwise APT might still think the older repo is the only source. The -y flag skips the interactive prompt, which is handy for scripts but feel free to omit it if you prefer a safety check.
Verify the upgrade
A quick version check tells you whether the operation succeeded:
curl --version
You should see something like “curl 8.x.x” with libssl supporting TLS 1.3. If the output still shows 7.81 (the default Jammy build), double‑check that the PPA is correctly enabled in /etc/apt/sources.list.d.
Clean up (optional)
If you ever want to revert to Ubuntu’s stock cURL, just remove the PPA and reinstall:
sudo add-apt-repository -r ppa:curl/curl
sudo apt update
sudo apt install --reinstall curl
Removing the repository prevents future unintended upgrades from that source.
That’s it – you’ve swapped out a stale tool for one that can actually talk to today’s servers.