Introduction
In this tutorial we learn how to install apt
on Kali Linux.
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
There are three methods to install apt
on Kali Linux. 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 on Kali Linux first since aptitude is usually not installed by default on Kali Linux. 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 Kali Linux
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 Kali Linux, we can use the command below:
sudo apt-get -y autoremove apt
Remove apt Configurations and Data
To remove apt
configuration and data from Kali Linux 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
Dependencies
apt have the following dependencies:
- adduser
- gpgv
- libapt-pkg6.0
- debian-archive-keyring
- libc6
- libgcc-s1
- libgnutls30
- libseccomp2
- libstdc++6
- libsystemd0
References
Summary
In this tutorial we learn how to install apt
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.