$ sudo apt remove gcc-12 [...] The following packages will be REMOVED: dkms g++-12 gcc-12 gcc-12-plugin-dev
$ sudo apt remove gcc-12
[...]
The following packages will be REMOVED:
dkms g++-12 gcc-12 gcc-12-plugin-dev