# Recommend package manager hardening

**URL:** https://discuss.privacyguides.net/t/recommend-package-manager-hardening/38076
**Category:** Guide Suggestions
**Created:** 2026-05-22T13:27:47Z
**Posts:** 4

## Post 1 by @anonymous595 — 2026-05-22T13:27:48Z

For example I use for apt this simple hardening:

```
sudo apt install apt-transport-https
sudo sed -i 's|http://|https://|g' /etc/apt/sources.list
sudo sed -i 's|http://|https://|g' /etc/apt/sources.list.d/*.list
```

This will force APT to use HTTPS.

If you are feeling extra paranoid, block port 80 in firewall.

Why: http is insecure and can be tampered super trivially.

**Important:** while _most_ repos support https, some may not. You will need to manually rotete them to find out.

---

## Post 2 by @anon7180143 — 2026-05-22T13:29:47Z

Do you have instructions for rpm based distros?

---

## Post 3 by @any1 — 2026-05-22T13:35:16Z

> <https://github.com/secureblue/secureblue/blob/e74193b1114653d5e982a0e4a8d0ec8dc7b4c1f7/files/scripts/httpsmirrors.sh>

---

## Post 4 by @fria — 2026-05-22T14:25:18Z

> [@anonymous595](#):
>
> Why: http is insecure and can be tampered super trivially.

I think most distros sign their packages and enforce verification checks so https isn’t so important, but it could be good for some added privacy.
