Simulate a package installation with apt

If you want to simulate an installation or upgrade for a package(s) without changing anything in system use the --simulate (-s, --just-print, --dry-run, --recon, --no-act) option for apt:

sudo apt install htop --simulate