File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ +++
2+ title = " How to use lax pinning in Alpine Linux"
3+ date = " 2026-04-13"
4+ updated = " 2026-04-13"
5+
6+ [taxonomies ]
7+ tags = [" alpine linux" ]
8+ +++
9+
10+ To pin the version to a major or minor release in ` apk ` (i.e. fuzzy matching):
11+
12+ ``` sh
13+ # matches 3.X.Y-rZ
14+ apk add ' openssl=~3'
15+
16+ # matches 3.5.Y-rZ
17+ apk add ' openssl=~3.5'
18+
19+ # matches 3.5.1-rZ
20+ apk add ' openssl=~3.5.1'
21+ ```
22+
23+ By default, ` apk add ` will avoid changing installed packages unless required.
24+ This means if the installed version of ` openssl ` is ` 3.5.1 ` , and we run `apk add
25+ openssl=~ 3.5` it will not be upgraded to ` 3.5.2` if its available.
26+
27+ To upgrade to the latest installable version (eg. ` 3.5.2 ` ), we must use `apk add
28+ --upgrade openssl=~ 3.5`.
29+
30+ ## References
31+ - [ apk - Package Pinning] ( https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper#Package_pinning )
32+ - [ apk-add] ( https://man.archlinux.org/man/apk-add.8.en )
You can’t perform that action at this time.
0 commit comments