apt
The APT package manager in Debian, Ubuntu, and derived distributions.
apt vs apt-get¶
- aptis for interactive use, including commonly-used commands from- apt-getand- apt-cache. And it has a nice progress bar.
- apt-getis more inclined for non-interactive use in scripts because of its stable interface.
nala: a prettier and faster frontend¶
Nala is a front-end for libapt-pkg and is a (almost) drop-in replacement for apt.
- Better Text UI
- Parallel package downloads
- Discover fastest mirrors (nala fetch)
To install nala:
To find fastest mirrors:
To update the system:
apt-fast: apt in parallel¶
ilikenwf/apt-fast is shell script wrapper for apt-get and aptitude that can drastically improve apt download times by downloading packages in parallel, with multiple connections per package.
One can use apt-fast commands just like apt e.g., sudo apt-fast update, sudo apt-fast dist-upgrade.
Should your downloads stall for any reasons, you'll need to run apt-fast clean to fix it.
To install apt-fast:
sudo add-apt-repository -y ppa:apt-fast/stable
echo debconf apt-fast/maxdownloads string 16 | sudo debconf-set-selections
echo debconf apt-fast/dlflag boolean true | sudo debconf-set-selections
echo debconf apt-fast/aptmanager string apt-get | sudo debconf-set-selections
sudo apt update && sudo apt install apt-fast -y
Synaptic : the GUI package manager for APT¶
The additional package apt-xapian-index gives a search box in synaptic.
Add signing keys¶
Use of
apt-keyis deprecated according to the Debian manpage
Here, we take adding signing keys for the Vivaldi browser as an example.
curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/vivaldi-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/vivaldi-keyring.gpg] https://repo.vivaldi.com/archive/deb/ stable main" | sudo tee /etc/apt/sources.list.d/vivaldi.list > /dev/null
- Text key files (.asc) should be converted to binary ones (.gpg) usinggpg --dearmor.
- In the apt list, use [signed-by=/path/to/key.gpg]to specify the location of the keyring.
- Use echo <stuff> | sudo tee <file>to add file content with sudo rights.
Fix APT package manager¶
Try these commands to fix broken apt package registry (from system76 docs).