Skip to content

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

Closed

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.

Activity

  1. self-assigned this
    on May 25, 2023
  2. dvdksn commented on May 25, 2023

    @dvdksn
    Contributor

    Thanks @noamraph! I've pushed your suggestion in #17415

  3. docker-robot commented on Jun 25, 2023

    @docker-robot

    Closed issues are locked after 30 days of inactivity.
    This helps our team focus on active issues.

    If you have found a problem that seems similar to this, please open a new issue.

    /lifecycle locked

  4. locked and limited conversation to collaborators on Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions