← 返回命令列表

Linux command

apk 命令

文本

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

常用示例

Update

apk upgrade -U

Example

apk update

Install

apk add [package]

Remove

apk del [package]

Repair/Reinstall

apk fix [package]

Search

apk search -v [keyword]

Example

apk search -d [keyword]

Example

apk info [package]

说明

apk (Alpine Package Keeper) is the package management tool for Alpine Linux. It handles installation, upgrade, and removal of packages, as well as repository management and system maintenance.

参数

add
Add or modify constraints and commit changes
del
Remove constraints and commit changes
fix
Fix, reinstall, or upgrade packages without modifying world
update
Update repository indexes
upgrade
Install upgrades available from repositories
cache
Manage the local package cache
search
Search for packages by name or description
info
Display detailed information about packages
list
List packages matching a pattern or criteria
query
Interrogate installed database and indexes
policy
Show repository policy for packages
-U, --update-cache
Update package lists before operation
-v, --verbose
Print more verbose information
-d, --description
Search in package descriptions
--allow-untrusted
Install local packages without verification
-X, --repository
Specify supplemental repositories

FAQ

What is the apk command used for?

apk (Alpine Package Keeper) is the package management tool for Alpine Linux. It handles installation, upgrade, and removal of packages, as well as repository management and system maintenance.

How do I run a basic apk example?

Run `apk upgrade -U` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does add do in apk?

Add or modify constraints and commit changes