diff --git a/pkgs_envsetup.py b/pkgs_envsetup.py
index be816fb0dbd15735e7da7437ee06189b11fb4cec..10062e8c5e56c22771634384dab4f400d372f056 100755
--- a/pkgs_envsetup.py
+++ b/pkgs_envsetup.py
@@ -29,11 +29,22 @@ def main():
             != 0
         ):
             result = run(
-                ["/usr/bin/apt-get", "install", "-y", pkg],
+                [
+                    "/usr/bin/apt-get",
+                    "install",
+                    "-q",
+                    "-y",
+                    "-o",
+                    "Dpkg::Options::='--force-confdef'",
+                    "-o",
+                    "Dpkg::Options::='--force-confold'",
+                    pkg,
+                ],
                 shell=False,
                 stdout=PIPE,
                 stderr=STDOUT,
                 stdin=PIPE,
+                env={"DEBIAN_FRONTEND": "noninteractive"},
             )
             if result.returncode == 0:
                 print("{} install succeeded".format(pkg))