purgepkgs=( # unnecessary modules and firmware unless you use certain usb wifi sticks: rtl8723bu-modules-4.19.94-ti-r42 rtl8821cu-modules-4.19.94-ti-r42 firmware-brcm80211 firmware-realtek # definitely not useful on am335x: bb-bbai-firmware # dubious out-of-tree modules you probably don't care about: seeed-modules-4.19.94-ti-r42 ti-cmem-4.16.00.00-modules-4.19.94-ti-r42 libpruio-modules-4.19.94-ti-r42 # pointless, you can read more than 30 MB/s from /dev/urandom thanks to hwrng haveged # use journalctl instead of oldschool logfiles in /var/log rsyslog ) sudo apt-get purge "${purgepkgs[@]}" # NOTE: persistent journal is disabled by default, so systemd-journald only # keeps a "runtime journal" in ram. To enable persistent journal logging to eMMC: sudo mkdir /var/log/journal && sudo systemctl restart systemd-journald # but only do that if you really need it, better to avoid unnecessary eMMC writes.