enforce no enteractiveness installing pkg with apt

use the same env vars and dpkg options as for the upgrade function
also link check mode to --simulate option when installing a pkg

fixes #2763