aptとapt-getの違い

とあるスクリプト内に apt update と書いたら

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

と出力された。なんだこれはと思ってウェブ検索すると、

apt‘s output is not well useable in scripts.

https://askubuntu.com/questions/990823/apt-gives-unstable-cli-interface-warning/

とのこと。man ページにも

SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use.

$ man apt

とあるので、通常のインタラクティブなコマンドラインでは apt 、スクリプト内では apt-get を使いましょう!ということですね。