Here are the packages that appear essential or important for basic system functionality. You should keep these in addition to your mentioned required packages + openssh, perl and python3: adduser apt-utils base-files base-passwd bash bsdutils coreutils dash debconf debian-archive-keyring dpkg e2fsprogs fdisk findutils gcc-12 (or your system's default gcc) grep gzip hostname init initramfs-tools kbd kmod less libgcc-s1 libc6 login mount procps sed systemd tar udev util-linux zlib1g The rest can potentially be removed, though carefully verify dependencies before removal. Some packages like sudo may be important depending on your setup.