Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

nerdctl purge -f > WARN[0004] failed to remove container <id> error="unknown container status unknown" #4294

Answered by apostasie
fuguesoft asked this question in Q&A
Discussion options

nerdctl purge -f returns the following error:

WARN[0004] failed to remove container error="unknown container status unknown"

I was messing around trying to install portainer-ce before I figured out I needed iptables installed.

I've since been able to delete all previously run containers with nerdctl purge -f except this pesky one.

It's the docker.io/portainer/portainer-ce:lts image that was advised to pull from their_docs with:

docker run -d -p 8000:8000 \
-p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer-ce:lts

nerdctl ps -a shows it's status as unknown and I can't run it. Maybe there's a
way to overwrite it?

You must be logged in to vote

Yeah, it is a bug.
containerd/containerd#11890 - there is a fix pending merge in containerd for it, so, hopefully we should get it with the next patch release.

Unfortunately, there is no cute way to clean the mess right now.

What you can do is kill the shim process for that container then immediately remove it.
Something like, get the shim: ps aux | grep shim | grep XXXCONTAINERIDXXX
Then kill -s KILL XXPROCESSIDXX; nerdctl rm -f XXXCONTAINERIDXXX.

Replies: 2 comments

Comment options

Yeah, it is a bug.
containerd/containerd#11890 - there is a fix pending merge in containerd for it, so, hopefully we should get it with the next patch release.

Unfortunately, there is no cute way to clean the mess right now.

What you can do is kill the shim process for that container then immediately remove it.
Something like, get the shim: ps aux | grep shim | grep XXXCONTAINERIDXXX
Then kill -s KILL XXPROCESSIDXX; nerdctl rm -f XXXCONTAINERIDXXX.

You must be logged in to vote
0 replies
Answer selected by fuguesoft
Comment options

oh! three commands in two lines? so cute!😊
thank you!

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /