Packages#
We remove unneeded services and packages from this repository, because carrying old configurations forever into the future increases the maintenance burden of this repository. If you don’t know whether a package is still required, you can inspect the package.
The ./manage.py
command has services
and packages
sub-commands to identify unusual services and packages, and an autoremove
sub-command to list candidates for removal.
Inspect packages#
Connect to the server and:
Show what files the package installs:
dpkg -L PACKAGE
Show what packages the package depends on (after
Depends:
andRecommends:
):apt show PACKAGE
Show what packages depends on this package:
apt rdepends PACKAGE
For example, the above commands show that redis
is a metapackage (installing only documentation) that depends on redis-server
, and that python3-virtualenv
provides library files whereas virtualenv
provides a binary file (needed by Salt).
List manually installed packages#
This StackOverflow answer works best. On Bytemark servers:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
On Hetzner servers, the /var/log/installer
directory is missing. The Ubuntu manifest can be used as an approximation:
comm -23 <(apt-mark showmanual | sort -u) <(curl -sS https://releases.ubuntu.com/bionic/ubuntu-18.04.5-live-server-amd64.manifest | cut -f1 | cut -d: -f1 | sort -u)