The command execution does not add any additional environment. It just passes the text to the shell interpreter. If it does not work on the shell, it can not work on the command option.
To confirm, can you please try running the command “docker image remove” on the terminal and check the results?
on the terminal, it is working fine. but in the command menu, it is not working. also as you can see docker version is completely different. you can compare both the screenshot for refrence also screenshots are from one device at the same time.
Docker API version is environment-dependent. The command execution is executed as ‘root’ user on your device. If your device has multiple docker installations or set up the DOCKER_API_VERSION to 1.20 it might end up using an older version.
Try this in your command execution
DOCKER_API_VERSION=1.21 docker version
If the above works, you run a command to remove the image as follows