Use apt-get instead of apt
From apt
's man page:
All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well.
apt(8) just changes the default value of some options (see apt.conf(5) and specifically the Binary
scope). So you should prefer using these commands (potentially with some additional options enabled) in
your scripts as they keep backward compatibility as much as possible.