curl is the standard command-line client for HTTP, HTTPS, FTP, SFTP, and many other URL schemes. On Debian it ships as the curl package in main, backed by libcurl. Install scripts, CI jobs, and docs that run curl https://… | sh expect the native apt binary at /usr/bin/curl—not a sandboxed Snap build.
This guide covers install curl on Debian for Debian 11 (Bullseye), 12 (Bookworm), and 13 (Trixie): install from apt, verify with HTTPS, optional Snap and source paths, PHP curl when you need the language binding, and fixes for the errors that show up most often in support threads (command not found, broken dependencies, EOL mirrors, DNS). I ran these steps on Debian 13 and kept real terminal output below. For Ubuntu packaging notes, see install curl on Ubuntu.
Tested on: Debian 13 (trixie); kernel 6.12.94+deb13-amd64; amd64; curl 8.14.1-2+deb13u3 with libcurl4t64; HTTP/2 and HTTP/3 features enabled.
command -v curl || { echo "install curl: sudo apt install curl"; exit 1; } before downloading.
Choose an install method
| Method | Best for | Result |
|---|---|---|
apt install curl |
Servers, desktops, automation (recommended) | /usr/bin/curl + libcurl4t64 |
| Community Snap | Experimental HTTP/3 curiosity only | Sandboxed snap run curl |
| Build from source | Unreleased upstream feature or custom TLS | /usr/local/bin/curl |
php-curl |
PHP apps needing curl_*() in code |
PHP module—not the shell CLI |
Use sudo apt install curl unless you have a specific reason not to.
What you are installing
| Package | Role on Debian 13 |
|---|---|
curl |
CLI—curl, wcurl wrapper |
libcurl4t64 |
Shared library (OpenSSL flavour) pulled in automatically |
php-curl |
Metapackage → php8.4-curl for PHP only |
libcurl4-openssl-dev |
Headers for compiling against libcurl (developers) |
sudo apt install curl does not install PHP bindings. For PHP, add php-curl separately (see PHP curl extension).
On Bullseye, the library package is typically libcurl4 without the t64 suffix—apt still resolves dependencies when you install curl.
Prerequisites
- Debian 11, 12, or 13 with working apt mirrors in
/etc/apt/sources.listorsources.list.d/. - sudo for package installation.
- Outbound network for
apt updateand HTTPS tests (sethttps_proxybehind corporate proxies). ca-certificatesfor TLS (usually already installed; install it if HTTPS fails with certificate errors).
Check whether curl is already present:
. /etc/os-release && echo "$PRETTY_NAME"
command -v curl || echo "curl not installed"
apt-cache policy curl libcurl4t64Debian GNU/Linux 13 (trixie)
/usr/bin/curl
curl:
Installed: 8.14.1-2+deb13u3
Candidate: 8.14.1-2+deb13u3
libcurl4t64:
Installed: 8.14.1-2+deb13u3
Candidate: 8.14.1-2+deb13u3Install curl from apt (recommended)
Refresh indexes and inspect versions:
sudo apt update
apt-cache policy curl libcurl4t64Install:
sudo apt install -y curlcurl is already the newest version (8.14.1-2+deb13u3).Use the full subcommand—install is required:
apt curlError: Invalid operation curlVerify the binary and library:
curl --version
which curl
dpkg -l curl libcurl4t64curl 8.14.1 (x86_64-pc-linux-gnu) libcurl/8.14.1 OpenSSL/3.5.6 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 ...
Release-Date: 2025-06-04, security patched: 8.14.1-2+deb13u3
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
/usr/bin/curl
ii curl 8.14.1-2+deb13u3 amd64 command line tool for transferring data with URL syntax
ii libcurl4t64:amd64 8.14.1-2+deb13u3 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)Dependency chain:
apt-cache depends curlcurl
Depends: libc6
Depends: libcurl4t64
Depends: zlib1g
Recommends: bash-completionUpgrade with normal system updates:
sudo apt update && sudo apt install --only-upgrade curlVerify with a live HTTPS request
Confirm DNS and TLS outside apt:
curl -sI https://example.com | head -5HTTP/2 200
date: Mon, 29 Jun 2026 10:11:13 GMT
content-type: text/htmlDownload a file:
curl -fsSLo /tmp/example.html https://example.com
wc -c /tmp/example.html559 /tmp/example.htmlFor flags (-X POST, -H, -u, proxies), see the curl command cheat sheet. When a tutorial uses wget instead, both tools can fetch URLs—but curl is what most bootstrap scripts call.
Install curl from Snap (optional)
The curl Snap (publisher Yuzukosho) advertises experimental HTTP/3. It is not the official Debian package:
sudo apt install -y snapd
sudo snap install snapd
sudo snap install curlSnap metadata warns about sandbox limits:
With the security nature of snap, the curl snap is only allowed to access
any non-hidden files (files or directory starting with '.', except .curlrc)
under the /home/$USER/ directory.That breaks installers reading ~/.config/… or hidden paths. For install eza on Debian, install Temurin on Debian, install Git, and curl | bash flows, use /usr/bin/curl from apt:
type -a curlcurl is /usr/bin/curl
curl is /bin/curlBuild curl from source (advanced)
Compile only when Debian’s curl package lacks a feature you need. Official steps: curl.se — install.
sudo apt install -y build-essential libssl-dev zlib1g-dev
cd /tmp
curl -fsSLO https://curl.se/download/curl-8.14.1.tar.bz2
tar -xjf curl-8.14.1.tar.bz2
cd curl-8.14.1
./configure --prefix=/usr/local --with-openssl
make -j"$(nproc)"
sudo make install
sudo ldconfig
/usr/local/bin/curl --versionRemove /usr/local/bin/curl when you want to return to the apt build. Pick one channel—custom /usr/local binaries can shadow apt if /usr/local/bin comes first on PATH.
PHP curl (not the same as the curl CLI)
Forum posts often mix up sudo apt install curl with PHP’s curl extension. For PHP apps:
sudo apt install -y php-curlDry-run on the test host pulled:
Inst php8.4-curl (8.4.21-1~deb13u1 ...)
Inst php-curl (2:8.4+96 ...)Confirm in PHP:
php -m | grep -i curlThat enables curl_*() functions in PHP. Shell scripts and install Android Studio on Debian tarball downloads still need the curl package.
curl on end-of-life Debian releases
When a Debian release moves to archive.debian.org, live security.debian.org URLs for that codename stop working. Point both archive and archive security at the frozen mirrors—for example Stretch:
echo "deb http://archive.debian.org/debian stretch main" | sudo tee /etc/apt/sources.list.d/stretch-archive.list
echo "deb http://archive.debian.org/debian-security stretch/updates main" | sudo tee /etc/apt/sources.list.d/stretch-security-archive.listYou may need:
echo 'Acquire::Check-Valid-Until "false";' | sudo tee /etc/apt/apt.conf.d/99archive
sudo apt update
sudo apt install curlUse this only on unsupported releases you cannot upgrade. Supported systems should keep normal deb.debian.org and debian-security entries.
Uninstall curl
APT:
sudo apt purge -y curl
sudo apt autoremove -ylibcurl4t64 may remain if other packages need it:
apt-cache rdepends libcurl4t64 | head -10The curl CLI itself is not marked Essential in Debian—reverse dependencies include tools like steam-launcher and abi-monitor, but minimal images often omit it until you install the package explicitly (Server Fault — curl on Debian/Ubuntu).
Snap:
sudo snap remove curlManual /usr/local build:
sudo rm -f /usr/local/bin/curl /usr/local/bin/curl-config
sudo ldconfigTroubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
curl: command not found / Command 'curl' not found |
Package missing on minimal image | sudo apt update && sudo apt install -y curl — see bash curl command not found |
Error: Invalid operation curl |
Omitted install |
sudo apt install curl, not sudo apt curl |
Package 'curl' has no installation candidate |
Stale indexes or wrong sources.list |
sudo apt update; verify main mirror lines; on EOL releases use archive.debian.org |
curl : Depends: libcurl4t64 (= X) but Y is to be installed |
curl / libcurl version skew |
apt-cache policy curl libcurl4t64; sudo apt full-upgrade or reinstall matching versions |
E: Unable to correct problems, you have held broken packages |
Conflicting pins or mixed suites | apt-mark showhold; align all sources to one Debian release |
apt update / Could not resolve host for mirrors |
DNS or proxy failure | Fix /etc/resolv.conf; test ping deb.debian.org; set https_proxy |
curl: (6) Could not resolve host |
DNS on client side | Fix resolver; check VPN and typo in URL |
curl: (60) SSL certificate problem |
Missing or outdated CA certs | sudo apt install ca-certificates; check system clock |
Snap curl cannot read ~/.hidden paths |
Snap confinement | sudo apt install curl; use /usr/bin/curl |
dpkg -l | grep curl matches libcurl only |
Library installed, CLI not | command -v curl; install curl package |
Installed php-curl but shell has no curl |
Different packages | sudo apt install curl for CLI |
| Wrong version after manual build | /usr/local/bin before /usr/bin |
which curl; remove custom build or fix PATH |
References
- curl.se — how to install curl and libcurl
- curl.se — download
- curl package on Debian
- libcurl4t64 on Debian
- Cyberciti — install curl on Debian with apt
- Linuxize — install and use curl on Debian
- Unix.StackExchange — installing curl via archive on EOL Debian
- Debian archive
- Install curl Snap on Debian
- On-site: install curl on Ubuntu, curl command cheat sheet, wget command, apt command, install sudo on Debian, list installed packages on Debian
Summary
Install curl on Debian with sudo apt update && sudo apt install -y curl. That places /usr/bin/curl on your path and installs matching libcurl4t64 (8.14.1-2+deb13u3 here, with HTTP/2 and HTTP/3 features). Confirm with curl --version and curl -sI https://example.com.
Skip the community Snap for bootstrap scripts that touch hidden home-directory paths. Install php-curl only when PHP needs the extension—not for shell downloads. On EOL releases, use archive.debian.org mirrors before apt install curl.

