Note that
apt purge ~c
does something, but apt(8) does not mention the support for the ~c
parameter.
On my system, it seems to be attempting to remove all packages that have
the "c" second character status in dpkg -l. Unfortunately, this
includes packages such as "locales" which I think are normally "ic", so
this command does not seem appropriate for removing "rc" packages as
suggested elsewhere.
The following packages will be REMOVED:
bsdmainutils* grub-legacy-ec2* isc-dhcp-client*
language-pack-en-base* linux-image-6.5.0-17-generic*
linux-image-6.5.0-25-generic* linux-modules-6.5.0-17-generic*
linux-modules-6.5.0-25-generic* linux-modules-extra-6.5.0-17-generic*
linux-modules-extra-6.5.0-25-generic* locales*
openvswitch-switch* reportbug* resolvconf* ufw* upower*