Justin Lin ⟔

Ubuntu List Manually Installed Packages

[#note]

If you want to get your ubuntu install close to a fresh install, you can try removing all manually installed packages after the original install.

To do that, you can list all currently installed packages and compare it with the list of packages part of the Ubuntu release’s manifest file (replace the URL with a different version of Ubuntu if needed). Note that if you updated your Ubuntu install to newer versions, then this will compare to the default packages for that particular Ubuntu version.

comm -23 <(dpkg --get-selections | awk '{print $1}' | sort) <(curl -s https://releases.ubuntu.com/24.04/ubuntu-24.04.1-live-server-amd64.manifest | awk '{print $1}' | sort)

This is a similar answer to the one provided here: https://askubuntu.com/questions/2389/how-to-list-manually-installed-packages

Use https://cdimage.ubuntu.com/releases/noble/release/ubuntu-24.04.1-live-server-arm64.manifest for the ARM version


Back