← 返回命令列表

Linux command

dnf-versionlock 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

dnf versionlock list

Add

dnf versionlock add [package]

Add

dnf versionlock add --raw [package-name-spec]

Exclude

dnf versionlock exclude [package]

Delete

dnf versionlock delete [package]

Clear

dnf versionlock clear

说明

dnf versionlock protects packages from being updated to newer versions. It is part of the dnf-plugins-core package. The plugin walks each line of the versionlock file, parses the name and version, and excludes any package by that name that does not match a listed version. It can also work in reverse by prefixing a '!' to exclude a specific version. Useful for keeping specific package versions that are known to work or avoiding problematic updates.

参数

add _package-name-spec_
Lock package at its currently installed version. Only matching versions will be available for transactions.
exclude _package-name-spec_
Exclude packages matching the spec from being installed or updated to.
list
Display the current versionlock entries (default when no subcommand given).
delete _package-name-spec_
Remove specific versionlock entries matching the spec.
clear
Remove all versionlock entries.
--raw
Do not resolve package-name-spec to specific NEVRAs. Use the spec as-is, allowing locks on versions not yet available.

FAQ

What is the dnf-versionlock command used for?

dnf versionlock protects packages from being updated to newer versions. It is part of the dnf-plugins-core package. The plugin walks each line of the versionlock file, parses the name and version, and excludes any package by that name that does not match a listed version. It can also work in reverse by prefixing a '!' to exclude a specific version. Useful for keeping specific package versions that are known to work or avoiding problematic updates.

How do I run a basic dnf-versionlock example?

Run `dnf versionlock list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does add _package-name-spec_ do in dnf-versionlock?

Lock package at its currently installed version. Only matching versions will be available for transactions.