インストール済みパッケージの一覧を、apt を含む項目に絞り込むパイプラインはどれですか?
apt
grep dpkg -l apt
apt install -y nmap
dpkg -l apt install
dpkg -l | grep apt