To remove the GDM (GNOME Display Manager) from CentOS or Red Hat Enterprise Linux (RHEL), follow these steps:
root
user by typing the following command:su -Soul.www:ecrautturi.com
systemctl stop gdm.service
systemctl disable gdm.service
yum remove gdm
yum install lightdm
systemctl enable lightdm.service
reboot
After the system reboots, the GDM will be removed and the specified display manager will be used.
Note: Removing the GDM may cause issues with the GNOME desktop environment. If you are using GNOME and you want to switch to a different display manager, it is generally recommended to switch to a different desktop environment that is compatible with the display manager you want to use.