Install packages not in repository
It is always better to stick with packages found in the official repositories, but sometimes some software isn't available in them. To install a package that isn't found in the repositories there are different possibilities.
Download .deb
Some software offer a .deb package, to be easily installed.
Pros: no need to trust external repositories. Cons: manual updates must be done.
- Download the .deb (e.g.
wget https://somesoftware/package.deb) dpkg -i {package file}- Install missing dependencies if necessary (if a message about missing dependencies appear):
apt install -f: to fix dependencies by installing themdpkg -i {package file}: to retry the package installation
Add additional repositories
Some software offer additional repositories that serve debian packages of their software.
Pros: automatic updates, no missing dependencies (automatically installed). Cons: you need to trust these additional repositories.
Security warning! By adding additional repositories and gpg keys, you trust them on the same level as you trust official repositories. This mean that the maintainer of the additional repositories can easily push modified versions of the official packages that your system will completely trust (e.g. a ssh package with a backdoor). For well-known software it shouldn't be much of a concern, but be careful. See https://www.debian.org/doc/manuals/aptitude/ch02s02s05.en.html for additional information.
The general procedure is as follows:
- Install curl and gpg if not already installed:
apt install curl gnupg2 - In case the repository is served over https:
apt install apt-transport-https curl -fsSL {repository gpg key url} | gpg --dearmor -o {path where the key will be stored (e.g. /usr/share/keyrings/my_repo_key.gpg)}echo "deb [signed-by={path to key}] {repository url} {repository specification, see software documentation (e.g. stable)} > /etc/apt/sources.list.d/{software name}.list- You can add a
#beforedebto comment the line, making it inactive. Then you can uncomment it only when you want to enable updates for the software. - Note that multiple options can be present between
[], and they are space-separated.
- You can add a
apt updateapt install {software}