Skip to content

Instantly share code, notes, and snippets.

@Lyvendia
Last active June 3, 2024 18:54
Show Gist options
  • Save Lyvendia/dba3730c6db7afa3162e6814455b6256 to your computer and use it in GitHub Desktop.
Save Lyvendia/dba3730c6db7afa3162e6814455b6256 to your computer and use it in GitHub Desktop.
Debian Notes

Debian notes

Package management

List manually installed packages

apt-mark showmanual
apt list '~i!~M'

List and remove packages with remaining configuration files

apt list '~c'
apt purge '~c'

List and remove packages not found in repositories

apt list '~o'
apt purge '~o'

Show holds

apt-mark showhold

More aggressive way to auto purge packages

apt -o 'Apt::AutoRemove::SuggestsImportant=false' autopurge

Even more aggressive way to auto purge packages

apt -o 'Apt::AutoRemove::SuggestsImportant=false' -o 'Apt::AutoRemove::RecommendsImportant=false' autopurge

Find leftover configuration files

find /etc -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.merge-error'

DNS over TLS

Install systemd-resolved

sudo apt install systemd-resolved

Configure the following in /etc/systemd/resolved.conf

DNS=194.242.2.4#base.dns.mullvad.net
DNSOverTLS=yes
Domains=~.

Disable IPv4 and IPv6 Auto DNS in the Settings GUI, then switch the network off and on for these settings to take effect

Restart systemd-resolved and NetworkManager

sudo systemctl restart systemd-resolved NetworkManager

Verify the DNS settings

resolvectl status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment