Put the script in a folder on your Nagios server. Run this command from within the folder where you placed the script: chmod +x /tmp/uninstall_reinstall_xi.sh This will prevent an "access denied" error. Then run the following command from within the folder that contains the script: ./uninstall_reinstall_xi.sh You will be asked if you are sure you want to proceed, type "y" hit enter and the script will begin the uninstall. When completed the script will then download the nagios latest release . It will then ask you if you want to do the install.