While there are scripts for migrating SLES to SLES4SAP, there are no tools the other way around. If you deployed the wrong template by mistake you can change the product without reinstallation with some manual steps. A comparable procedure has also been documented by the vendor for installing SUSE Manager.
First of all, identify the installed release:
# rpm -qa | grep -i release SLES_SAP-release SLES_SAP-release-DVD
In this case, two packages and a symbolic link to the product need to be removed:
# rpm -e --nodeps SLES_SAP-release SLES_SAP-release-DVD # rm /etc/products.d/baseproduct
Afterwards, edit the file /etc/zypp/zypp.conf:
solver.onlyRequires = false
Next you will need to register the system in SUSE Customer Center using a SLES activation key or use SUSE Manager. Alternatively you can also use the installation DVD as zypper repository.
After this, ensure installing the SLES product and – if not done automatically – creating a symbolic link:
# zypper in sles-release # ln -s /etc/products.d/SLES.prod /etc/products.d/baseproduct
Finally you will need to remove orphaned packages – those packages that are extending the SLES package base in SLES4SAP:
# zypper packages --orphaned
In my case, the following pacakges needed to be removed:
# zypper remove HANA-Firewall libgdata-lang yast2-hana* yast2-sap* saptune saprouter* sap-netscape-link sap-installation-wizard
After rebooting the system, the appropriate product should be enabled:
$ grep -i pretty /etc/os-release PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"