I want delete containers in docker (Ubuntu 22.04)
I try like a user, and like a root: otherwise, I get the same result.
docker ps -a
docker container ls
exec: "com.docker.cli": executable file not found in $PATH
Current PATH : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/anatoly
2
Answers
Get Container ID:
Force delete Container ( will delete it even if it’s running)
To seel all other available options:
https://docs.docker.com/engine/reference/commandline/rm/
You must reproduce this
Login as a root
Go to
cd
/var/lib/docker
Now if you ls,you should get
You have here whole thruth about containers ,volumes and etc.