_run() forwards the execution context to run_cmd() when sudo is not
requested, but calls run_sudo(cmd) without the context in the sudo
case. run_sudo() then falls back to a fresh local context, so sudoed
dpkg and dpkg-query commands run on the local machine instead of on
the given context, e.g. Distro._delete() on a remote host.
Pass the context and non-interactive stdin to run_sudo() as well.
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2
Signed-off-by: Jan Lindemann <jan@janware.com>