Skip to content

pkg install -A marks pkg as automatically installed if upgraded inline #2683

@astralblue

Description

@astralblue

Environment

pkg version 2.7.5 on FreeBSD 15.0-RELEASE-p8

Background

When pkg install runs and it sees that pkg itself is outdated, it offers to update pkg before proceeding.

Problem

When pkg updates itself as part of a pkg install -A command (including non-interactive pkg install -A -y) to temporarily install a package subject for later auto-removal, the updated pkg itself is also marked as automatically installed and becomes subject to auto-removal. Then later when pkg autoremove is run, pkg gets removed as well, unless marked as vital.

Workaround

Run pkg set -v 1 -y pkg to mark pkg as vital—this prevents it from being auto-removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions