Cyberithub

How to Install apt-transport-https on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, I will take you through the steps to install apt-transport-https on Ubuntu 20.04 LTS (Focal Fossa). apt-transport-https is an apt transport that allows the access of repositories over HTTPS or HTTP secure protocol. Since http by nature is an insecure transport protocol so any information passing through http protocol is vulnerable to externals attacks as data is in unencrypted format. So to ensure the security in accessing repositories by the APT tools, apt-transport-https package needs to be installed in the system. This can be done by following the steps given in the below section.

 

How to Install apt-transport-https on Ubuntu 20.04 LTS (Focal Fossa)

How to Install apt-transport-https on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Install make command on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 LTS Server.

b) You should have sudo or root access to run privileged commands.

Advertisements

c) You should have apt and dpkg utility available in your Server.

 

Step 2: Update Your Server

In the first step, you need to sync your system packages to the versions available on the Ubuntu repo by using sudo apt update && sudo apt upgrade command as shown below.

Advertisements
cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
[sudo] password for cyberithub:
Hit:2 https://deb.tableplus.com/debian/20 tableplus InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:1 https://downloads.apache.org/cassandra/debian 40x InRelease
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [94.1 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,345 kB]
.............................................................

 

Step 3: Install apt-transport-https

In the next step, you can install apt-transport-https package by using sudo apt install apt-transport-https command as shown below. This will download and install the package from default Ubuntu repo along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
dctrl-tools
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,704 B of archives.
After this operation, 162 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.9 [1,704 B]
Fetched 1,704 B in 1s (2,906 B/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 201572 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.0.9_all.deb ...
Unpacking apt-transport-https (2.0.9) ...
Setting up apt-transport-https (2.0.9) ...

 

Step 4: Verify Installation

After successful installation, you can verify the installed files path by using dpkg -L apt-transport-https command as shown below.

Advertisements
cyberithub@ubuntu:~$ dpkg -L apt-transport-https
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/apt-transport-https
/usr/share/doc/apt-transport-https/copyright
/usr/share/doc/apt-transport-https/NEWS.Debian.gz
/usr/share/doc/apt-transport-https/changelog.gz

 

Step 5: Uninstall apt-transport-https

Once you are done with apt-transport-https package, you can also choose to uninstall it from your System by using sudo apt remove apt-transport-https command as shown below.

cyberithub@ubuntu:~$ sudo apt remove apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
dctrl-tools
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
apt-transport-https
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 162 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 201576 files and directories currently installed.)
Removing apt-transport-https (2.0.9) ...

Leave a Comment