Skip to content

"apt-get remove" command doesn't remove installed packages if a package isn't found #17405

@noamraph

Description

@noamraph

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

The docs instruct to remove old versions by running:

sudo apt-get remove docker docker-engine docker.io containerd runc

However, it turns out that if a package isn't found, the command fails entirely:

image

I'm on Ubuntu 22.04, WSL2.

Location

https://docs.docker.com/engine/install/ubuntu/

Suggestion

Perhaps replace the command with something like this:

for pkg in docker docker-engine docker.io containerd runc; do sudo apt-get remove -y $pkg; done

This would remove all packages, regardless of whether packages are known or not.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions