Contents

Apt package manager

Things about the apt package manager used by Ubuntu and friends (e.g. PopOS).

Sorry Debian, I know very little about you.

apt vs apt-get

apt command is more suited towards interactive use, including commonly-used commands from apt-get and apt-cache. And it comes with a nice progress bar.

apt-get is geared towards scripting use due to its stable interface.

apt-fast for faster downloads

apt-fast is shellscript wrapper for apt-get and aptitude that can drastically improve apt download times by downloading packages in parallel, with multiple connections per package.

Interaction-free Installation

1
2
3
4
5
6
# Set up 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

Usage of apt-fast

apt-fast is a drop-in replacement of apt-get. e.g. you can use sudo apt-fast update, sudo apt-fast dist-upgrade

Should your download stall for any number of reasons, you’ll need to do an apt-fast clean.

Synaptic the GUI package manager

apt-xapian-index offers quick filter search box in synaptic @UbuntuHandBook

1
sudo apt install synaptic apt-xapian-index

Deprecation of apt-key command

Use of apt-key is deprecated. Debian manpage

One may receive a apt-key add is deprecated message from Ubuntu 20.10 and newer when adding keys from 3rd party repos.

It is recommended to put keys directly into /etc/apt/trusted.gpg.d/.

  • .asc for text public keys
  • .gpg for binary public keys

For example, instead of this

1
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo apt-key add -

Do this

1
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo tee /etc/apt/trusted.gpg.d/vivaldi.asc

Fix apt package manager

Try these commands to fix borked apt package registry. Taken from System76 docs.

1
2
3
4
5
6
sudo apt clean
sudo apt update -m
sudo dpkg --configure -a
sudo apt install -f
sudo apt dist-upgrade
sudo apt autoremove --purge