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.

Revisions

  1. Lyvendia revised this gist Jun 3, 2024. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions debian-notes.md
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,11 @@ More aggressive way to auto purge packages
    apt -o 'Apt::AutoRemove::SuggestsImportant=false' autopurge
    ```

    Even more aggressive way to auto purge packages
    ```bash
    apt -o 'Apt::AutoRemove::SuggestsImportant=false' -o 'Apt::AutoRemove::RecommendsImportant=false' autopurge
    ```

    Find leftover configuration files
    ```bash
    find /etc -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.merge-error'
  2. Lyvendia revised this gist Dec 11, 2023. 1 changed file with 35 additions and 7 deletions.
    42 changes: 35 additions & 7 deletions debian-notes.md
    Original file line number Diff line number Diff line change
    @@ -1,34 +1,62 @@
    ## Debian notes
    # Debian notes

    ### List manually installed packages
    ## Package management

    List manually installed packages
    ```bash
    apt-mark showmanual
    apt list '~i!~M'
    ```

    ### List and remove packages with remaining configuration files
    List and remove packages with remaining configuration files
    ```bash
    apt list '~c'
    apt purge '~c'
    ```

    ### List and remove packages not found in repositories
    List and remove packages not found in repositories
    ```bash
    apt list '~o'
    apt purge '~o'
    ```

    ### Show holds
    Show holds
    ```bash
    apt-mark showhold
    ```

    ### More aggressive way to auto purge packages
    More aggressive way to auto purge packages
    ```bash
    apt -o 'Apt::AutoRemove::SuggestsImportant=false' autopurge
    ```

    ### Find leftover configuration files
    Find leftover configuration files
    ```bash
    find /etc -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.merge-error'
    ```

    ## DNS over TLS

    Install systemd-resolved
    ```bash
    sudo apt install systemd-resolved
    ```

    Configure the following in /etc/systemd/resolved.conf
    ```ini
    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
    ```bash
    sudo systemctl restart systemd-resolved NetworkManager
    ```

    Verify the DNS settings
    ```bash
    resolvectl status
    ```
  3. Lyvendia created this gist Dec 7, 2023.
    34 changes: 34 additions & 0 deletions debian-notes.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    ## Debian notes

    ### List manually installed packages
    ```bash
    apt-mark showmanual
    apt list '~i!~M'
    ```

    ### List and remove packages with remaining configuration files
    ```bash
    apt list '~c'
    apt purge '~c'
    ```

    ### List and remove packages not found in repositories
    ```bash
    apt list '~o'
    apt purge '~o'
    ```

    ### Show holds
    ```bash
    apt-mark showhold
    ```

    ### More aggressive way to auto purge packages
    ```bash
    apt -o 'Apt::AutoRemove::SuggestsImportant=false' autopurge
    ```

    ### Find leftover configuration files
    ```bash
    find /etc -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.merge-error'
    ```