I am unable to uninstall x-pack from es 6.1.2 docker image.I have tried with root/elasticsearch user.I am getting the below error message.
[root@e1e91a610ab5 bin]# ./elasticsearch-plugin remove x-pack --purge
-> removing [x-pack]...
Exception in thread "main" java.io.IOException: Could not remove the following files (in the order of attempts):
/usr/share/elasticsearch/plugins/x-pack/platform/darwin-x86_64/bin/autoconfig: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/x-pack/platform/darwin-x86_64/bin/autoconfig
/usr/share/elasticsearch/plugins/x-pack/platform/darwin-x86_64/bin/autodetect: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/x-pack/platform/darwin-x86_64/bin/autodetect
Even I cannot remove the plugins/x-pack.i am getting the below errors
[root@d4c37e9bb96f elasticsearch]# rm -rf plugins/x-pack/
rm: cannot remove 'plugins/x-pack/platform/darwin-x86_64/bin': Directory not empty
rm: cannot remove 'plugins/x-pack/platform/darwin-x86_64/lib': Directory not empty
rm: cannot remove 'plugins/x-pack/platform/linux-x86_64/bin': Directory not empty
rm: cannot remove 'plugins/x-pack/platform/linux-x86_64/lib': Directory not empty
rm: cannot remove 'plugins/x-pack/platform/windows-x86_64/bin': Directory not empty
rm: cannot remove 'plugins/x-pack/resources': Directory not empty
[root@d4c37e9bb96f elasticsearch]#