How To Install apt on Ubuntu 20.04

Hostnbit
In this tutorial we learn how to install apt on Ubuntu 20.04. apt is commandline package manager commandline package manager commandline package manager commandline package manager

Introduction

In this tutorial we learn how to install apt on Ubuntu 20.04.

What is apt

apt is:

This package provides commandline tools for searching and
managing as well as querying information about packages
as a low-level access to all features of the libapt-pkg library.

These include:

  • apt-get for retrieval of packages and information about them
    from authenticated sources and for installation, upgrade and
    removal of packages together with their dependencies
  • apt-cache for querying available information about installed
    as well as installable packages
  • apt-cdrom to use removable media as a source for packages
  • apt-config as an interface to the configuration settings
  • apt-key as an interface to manage authentication keys
    Task: minimal
    Build-Essential: yes

Package: apt
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 4183
Maintainer: Ubuntu Developers [email protected]
Architecture: amd64
Version: 2.0.4
Replaces: apt-transport-https (« 1.5~alpha4~), apt-utils (« 1.3~exp2~)
Provides: apt-transport-https (= 2.0.4)
Depends: adduser, gpgv | gpgv2 | gpgv1, libapt-pkg6.0 (>= 2.0.4), ubuntu-keyring, libc6 (>= 2.15), libgcc-s1 (>= 3.0), libgnutls30 (>= 3.6.12), libseccomp2 (>= 2.4.2), libstdc++6 (>= 9), libsystemd0
Recommends: ca-certificates
Suggests: apt-doc, aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), gnupg | gnupg2 | gnupg1, powermgmt-base
Breaks: apt-transport-https (« 1.5~alpha4~), apt-utils (« 1.3~exp2~), aptitude (« 0.8.10)
Conffiles:
/etc/apt/apt.conf.d/01-vendor-ubuntu c69ce53f5f0755e5ac4441702e820505
/etc/apt/apt.conf.d/01autoremove ab6540f7278a05a4b7f9e58afcaa5f46
/etc/cron.daily/apt-compat 49e9b2cfa17849700d4db735d04244f3
/etc/kernel/postinst.d/apt-auto-removal 4ad976a68f045517cf4696cec7b8aa3a
/etc/logrotate.d/apt 179f2ed4f85cbaca12fa3d69c2a4a1c3
Description-en: commandline package manager
This package provides commandline tools for searching and
managing as well as querying information about packages
as a low-level access to all features of the libapt-pkg library.

These include:

  • apt-get for retrieval of packages and information about them
    from authenticated sources and for installation, upgrade and
    removal of packages together with their dependencies
  • apt-cache for querying available information about installed
    as well as installable packages
  • apt-cdrom to use removable media as a source for packages
  • apt-config as an interface to the configuration settings
  • apt-key as an interface to manage authentication keys
    Original-Maintainer: APT Development Team [email protected]

Package: apt
Architecture: amd64
Version: 2.0.2ubuntu0.2
Priority: important
Section: admin
Origin: Ubuntu
Maintainer: Ubuntu Developers [email protected]
Original-Maintainer: APT Development Team [email protected]
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4183
Provides: apt-transport-https (= 2.0.2ubuntu0.2)
Depends: adduser, gpgv | gpgv2 | gpgv1, libapt-pkg6.0 (>= 2.0.2ubuntu0.2), ubuntu-keyring, libc6 (>= 2.15), libgcc-s1 (>= 3.0), libgnutls30 (>= 3.6.12), libseccomp2 (>= 2.4.2), libstdc++6 (>= 9), libsystemd0
Recommends: ca-certificates
Suggests: apt-doc, aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), gnupg | gnupg2 | gnupg1, powermgmt-base
Breaks: apt-transport-https (« 1.5~alpha4~), apt-utils (« 1.3~exp2~), aptitude (« 0.8.10)
Replaces: apt-transport-https (« 1.5~alpha4~), apt-utils (« 1.3~exp2~)
Filename: pool/main/a/apt/apt_2.0.2ubuntu0.2_amd64.deb
Size: 1289696
MD5sum: 217707e46ec7d2377152bc139876c83c
SHA1: b0d79528d10de5d03024aa193c66620901485778
SHA256: 40b103c057258fe69bf75d8e36c9ab0a92eed77280f12ef6d394560f29c4765c
SHA512: 35b3927386df2bdcfbc68e709108cc9137f80dceeb8d95dee183a12dc5997d44bb1b5536535d27c56b1f4c96c4603f491144f1e5260e387701c7ec62be59c6c4
Description-en: commandline package manager
This package provides commandline tools for searching and
managing as well as querying information about packages
as a low-level access to all features of the libapt-pkg library.

These include:

  • apt-get for retrieval of packages and information about them
    from authenticated sources and for installation, upgrade and
    removal of packages together with their dependencies
  • apt-cache for querying available information about installed
    as well as installable packages
  • apt-cdrom to use removable media as a source for packages
  • apt-config as an interface to the configuration settings
  • apt-key as an interface to manage authentication keys
    Task: minimal
    Build-Essential: yes

Package: apt
Architecture: amd64
Version: 2.0.2
Priority: important
Section: admin
Origin: Ubuntu
Maintainer: Ubuntu Developers [email protected]
Original-Maintainer: APT Development Team [email protected]
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4182
Provides: apt-transport-https (= 2.0.2)
Depends: adduser, gpgv | gpgv2 | gpgv1, libapt-pkg6.0 (>= 2.0.2), ubuntu-keyring, libc6 (>= 2.15), libgcc-s1 (>= 3.0), libgnutls30 (>= 3.6.12), libseccomp2 (>= 2.4.2), libstdc++6 (>= 9), libsystemd0
Recommends: ca-certificates
Suggests: apt-doc, aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), gnupg | gnupg2 | gnupg1, powermgmt-base
Breaks: apt-transport-https (« 1.5~alpha4~), apt-utils (« 1.3~exp2~), aptitude (« 0.8.10)
Replaces: apt-transport-https (« 1.5~alpha4~), apt-utils (« 1.3~exp2~)
Filename: pool/main/a/apt/apt_2.0.2_amd64.deb
Size: 1288960
MD5sum: b3510e0836223a7921205a459d5d6eae
SHA1: 2b6f23eebcad75926f1db0ebcf010cc8b95de682
SHA256: bc96088b0253a9bc41410a44f53c907c6d9bc9f210768ab2ef0bb63d5e22dfc3
Description-en: commandline package manager
This package provides commandline tools for searching and
managing as well as querying information about packages
as a low-level access to all features of the libapt-pkg library.

These include:

  • apt-get for retrieval of packages and information about them
    from authenticated sources and for installation, upgrade and
    removal of packages together with their dependencies
  • apt-cache for querying available information about installed
    as well as installable packages
  • apt-cdrom to use removable media as a source for packages
  • apt-config as an interface to the configuration settings
  • apt-key as an interface to manage authentication keys
    Task: minimal
    Build-Essential: yes

There are three methods to install apt on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install apt Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install apt using apt-get by running the following command:

sudo apt-get -y install apt

Install apt Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install apt using apt by running the following command:

sudo apt -y install apt

Install apt Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install apt using aptitude by running the following command:

sudo aptitude -y install apt

How To Uninstall apt on Ubuntu 20.04

To uninstall only the apt package we can use the following command:

sudo apt-get remove apt

Uninstall apt And Its Dependencies

To uninstall apt and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove apt

Remove apt Configurations and Data

To remove apt configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge apt

Remove apt configuration, data, and all of its dependencies

We can use the following command to remove apt configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge apt

References

AdvertisementsEzoicreport this ad

Summary

In this tutorial we learn how to install apt package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.

Hostnbit

Leave a Comment

Your email address will not be published. Required fields are marked *

Menu Title
Scroll to Top