Skip to content

apt

Using APT - Advanced Package Tool

apt-get man pages

Installing a package
sudo apt-get install <PackageName>
Removing a package

Removes a package, however it leaves its configuration files on the system

sudo apt-get remove <PackageName>
Purging a package

Removes the package and any of its configuration files as long as they are located in /etc. If you have configuration files in a location such as /home those configurations will remain there when using purge.

sudo apt-get purge <PackageName>
Remove & Purging a package
apt-get remove --purge packagename

You can read more about the differences between purge and remove here apt remove vs apt purge

Upgrade OS run
do-release-upgrade
To upgrade existing package
sudo apt-get --only-upgrade install <PackageName>
To install & Remove a package
sudo apt-get install <PackageName>
sudo apt-get remove <PackageName>
To search for package
apt search <PackageName>
See list of upgradable packages
sudo apt-get update
sudo apt list --upgradable
List installed packages
sudo apt list --installed
View package details, version, etc.
apt show <PackageName>
Check stats on installed Packages
apt-cache stats
Show installed packages names
apt-cache pkgnames
apt-cache pkgnames <name>*
Search for package
apt-cache search <name>
Check unmet dependencies
apt-cache unmet
Check Install repos
less /etc/apt/sources.list
apt manual pages
man apt
man apt-get
Packages installed with apt-get are located in /var/cache/apt/archives
To check Repo sources
sudo apt edit-sources

Adding Apt Repository In Ubuntu

Resources How-to-add-apt-repository-in-ubuntu

Adding Kali Repository to Ubuntu

Step-1: Install Git
sudo apt install git
git --version
Step-2: Install Python 2.7
sudo apt install python2    <OR>     sudo apt install python-minimal
python2 --version
Step-3: Install Katoolin
cd ~
sudo git clone <https://github.com/LionSec/katoolin.git>
ls -l
sudo cp katoolin/katoolin.py /usr/bin/katoolin

Make the script executable

sudo chmod +x /usr/bin/katoolin
Step-4: Launch Katoolin
sudo katoolin

OR

sudo python2 /usr/bin/katoolin
Step-5: Add Kali Repositories & Update

katoolin - Choose 1 "add Kali Linux repositories" - Choose 1 again "Add Kali Linux repositories"

If you get the error gpg: keyserver receive failed: No name

wget -q -O - archive.kali.org/archive-key.asc | sudo  apt-key add
sudo apt update

katoolin - Update repos

- Option 1 "Add Kali Linux repositories"
- Option 2 "Update"
- When done, type gohome to return the katoolin main interface window.
Step-6: katoolin - View Categories to install Kali Linux Apps on Ubuntu
- Option 2 "View Categories"
Step-7: katoolin - Install the Classic Menu indicator
- Option 3 to Classic Menu indicator
Step-8: katoolin - Install Kali Menu
- Option 4 install the Kali menu