sudo dnf clean all on AlmaLinux).Machine Images
Generalizing an Image
Every VM cloned from a machine image inherits all of the source VM’s on-disk state.
It is recommend that before you capture an image, SSH into the source VM and strip the bits that should be unique per VM, such as host keys, machine ID, cloud-init caches, logs, and shell history:
Exit the SSH session when you are done, then stop the VM so its disk is in a consistent state for capture.
The commands above assume a Debian or Ubuntu source VM. On other distributions, substitute the equivalent package-cache cleanup (for example,