
Checking presence of 'apt', 'yum' or 'zypper' command is not very reliable way to determine package manager type. E.g. OpenSUSE 25 has 'apt' which is wrapper over 'zypper' or rpm tools can be installed on Ubuntu. More relible way is to check /etc/*-release file and if it is not availabe try to check presence of apt, yum or zypper