$ apt list --installed | grep -v ^lib | sort > apt-installed


$ egrep '^(ftp|telnet)' apt-installed
ftp/jammy,now 20210827-4build1 all [installed]
telnet/jammy,now 0.17-44build1 amd64 [installed]


$ apt info ftp 2>/dev/null | grep ^Desc
Description: dummy transitional package for tnftp


$ ls -l $(which ftp)
lrwxrwxrwx 1 root root 21 Apr 21 23:07 /usr/bin/ftp -> /etc/alternatives/ftp
$ ls -l /etc/alternatives/ftp
lrwxrwxrwx 1 root root 14 Apr 21 23:07 /etc/alternatives/ftp -> /usr/bin/tnftp
$ ls -l /usr/bin/tnftp
-rwxr-xr-x 1 root root 183192 Mar 25 19:01 /usr/bin/tnftp


$ apt info tnftp 2>/dev/null | grep -A5 ^Desc
Description: enhanced ftp client
tnftp is what many users affectionately call the enhanced ftp
client in NetBSD (http://www.netbsd.org).
This package is a `port' of the NetBSD ftp client to other systems.


$ apt info telnet 2>/dev/null | grep -A5 ^Desc
Description: basic telnet client
The telnet command is used for interactive communication with another host
using the TELNET protocol.
For the purpose of remote login, the present client executable should be
depreciated in favour of an ssh-client, or in some cases with variants like


$ ls -l $(which telnet)
lrwxrwxrwx 1 root root 24 Apr 21 23:07 /usr/bin/telnet -> /etc/alternatives/telnet
$ ls -l /etc/alternatives/telnet
lrwxrwxrwx 1 root root 22 Apr 21 23:07 /etc/alternatives/telnet -> /usr/bin/telnet.netkit
$ ls -l /usr/bin/telnet.netkit
-rwxr-xr-x 1 root root 110144 Mar 25 01:20 /usr/bin/telnet.netkit
$ dpkg -S /usr/bin/telnet.netkit
telnet: /usr/bin/telnet.netkit



$ sudo apt -y remove ftp telnet tnftp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-aws-headers-5.15.0-1008 linux-headers-5.15.0-1008-aws linux-image-5.15.0-1008-aws
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
ftp telnet tnftp
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 421 kB disk space will be freed.
(Reading database ... 171728 files and directories currently installed.)
Removing ftp (20210827-4build1) ...
Removing telnet (0.17-44build1) ...
Removing tnftp (20210827-4build1) ...
Processing triggers for man-db (2.10.2-1) ...


調べたらMinimal Ubuntu 22.04 LTS – JammyというAMIもあるようなので、そっちに乗り換えようかな・・・。