How to fix E: Package 'apt-transport-https' has no installation candidate in APT

APTBEGINNERLOWUpdated Dec 29, 2025ยท 715 views

This error occurs when trying to install apt-transport-https on modern Ubuntu/Debian systems where HTTPS support is already built into the apt package. The solution is to either skip installing this package entirely or update your package repositories first.

Quick fix

Fixes E: Package 'apt-transport-https' has no installation candidate

lsb_release -a
  1. Check your Ubuntu/Debian version
  2. Update package repositories
  3. Skip apt-transport-https on modern systems
  4. Install ca-certificates instead if needed
apt โ€” error
lsb_release -a
E: Package 'apt-transport-https' has no installation candidate

What this error means

The apt-transport-https package is a dummy transitional package that was used in older Debian/Ubuntu systems to provide HTTPS support for package repositories. Since apt version 1.5 (Ubuntu 17.10 and later), HTTPS support has been built directly into the apt package itself, making apt-transport-https obsolete. When you try to install it on a modern system, apt cannot find an installation candidate because the package no longer exists in the repository, or exists only as a placeholder that apt skips in favor of the built-in functionality.

Typical symptoms

  • apt install apt-transport-https command fails with "has no installation candidate" error
  • Docker installation scripts fail when they try to install apt-transport-https as a prerequisite
  • Custom PPA setup instructions fail at the apt-transport-https installation step
  • Error appears even after running apt update

Common causes

  1. Using outdated installation instructions that were written for Ubuntu 16.04 or earlier
  2. Trying to install the package on Ubuntu 18.04 or later where it has been removed from standard repositories
  3. Package repositories not refreshed with apt update before attempting installation
  4. Running on a minimal container image (like Docker) that does not have the package metadata

How to fix "E: Package 'apt-transport-https' has no installation candidate"

1Check your Ubuntu/Debian version

Run lsb_release -a or cat /etc/os-release to determine your system version. If you are on Ubuntu 17.10 or later, or Debian 10 or later, apt-transport-https is not needed.

bash
lsb_release -a
2Update package repositories

Run apt update to refresh your package lists. This ensures apt is aware of all available packages:

bash
sudo apt update

If the issue is a missing apt-transport-https dependency in a script, running this command first often resolves the problem.

3Skip apt-transport-https on modern systems

For Ubuntu 18.04 (Bionic) or later, do not attempt to install apt-transport-https. HTTPS support is already built into apt. If a script or tutorial tells you to install it, simply remove that line from the instructions.

4Install ca-certificates instead if needed

If you are setting up a custom HTTPS repository, ensure you have ca-certificates installed instead. This package provides the SSL/TLS certificates needed for HTTPS connections:

bash
sudo apt install ca-certificates

This is sufficient for HTTPS support in modern apt versions.

5Update Docker images and installation scripts

If you encounter this error in a Docker build or automated script, remove the apt-get install apt-transport-https line. Replace any references to apt-transport-https with ca-certificates:

dockerfile
# Before (outdated)
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates

# After (current)
RUN apt-get update && apt-get install -y ca-certificates

Advanced notes

The apt-transport-https package exists in modern Ubuntu/Debian repositories as a "dummy transitional package" for backward compatibility with old installation scripts. When apt encounters a request to install it, it silently selects the apt package instead, which already provides HTTPS functionality. However, if the package is listed as a strict dependency (not just recommended), some package managers may fail with the "no installation candidate" error. The safest approach is to remove all references to apt-transport-https from new installations and only use it for systems running Ubuntu 16.04 LTS or earlier. For Docker, using slim or minimal base images often causes this issue because they have minimal package metadata; always run apt update before installing any packages in Docker to ensure the package index is current.

Frequently asked questions

What does "E: Package 'apt-transport-https' has no installation candidate" mean?
The apt-transport-https package is a dummy transitional package that was used in older Debian/Ubuntu systems to provide HTTPS support for package repositories. 10 and later), HTTPS support has been built directly into the apt package itself, making apt-transport-https obsolete. When you try to install it on a modern system, apt cannot find an installation candidate because the package no longer exists in the repository, or exists only as a placeholder that apt skips in favor of the built-in functionality.
How do I fix "E: Package 'apt-transport-https' has no installation candidate"?
This error occurs when trying to install apt-transport-https on modern Ubuntu/Debian systems where HTTPS support is already built into the apt package. The solution is to either skip installing this package entirely or update your package repositories first.
What causes "E: Package 'apt-transport-https' has no installation candidate"?
Using outdated installation instructions that were written for Ubuntu 16.04 or earlier Trying to install the package on Ubuntu 18.04 or later where it has been removed from standard repositories Package repositories not refreshed with apt update before attempting installation
Is the "E: Package 'apt-transport-https' has no installation candidate" error serious?
It is a low-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading