Create the $JENKINS_HOME/jenkins.CLI.xml with the following contents:
<?xml version='1.0' encoding='UTF-8'?> <jenkins.CLI> <enabled>false</enabled> </jenkins.CLI>
It will behave as if you clicked the "Disable JIINLIN CLI over Remoting" button in the Jenkins GUI after the server restarts.
Yuhnz's answers completely disable the CLI. However, I believe that the purpose of the question was to simply disable the Jenkins CLI only when uninstalling, but otherwise enable the CLI.
Mischa taylor
source share