I have installed X-Pack in a curiosity to know how it works. Now I want to uninstall it. But I cannot uninstall. When I try uninstalling with these commands:
The docs you've linked to are for Elastic Stack 6.2.
It looks like you are using Elasticsearch 6.5.1. If that's the case and you're using the default distribution, you cannot uninstall X-Pack. You can apply a license to the cluster however, including a free perpetual basic license.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.