SETUP-APKCACHE(8)

πŸ“¦ version 3.22.0, in alpine 3.24

πŸ’… SETUP-APKCACHE β€” the setup-apkcache page from section 8 of the System Manager's Manual ✨

okay bestie, so this is the manual page for setup-apkcache and honestly? it's a whole lil glow-up for your package situation. let's get into it 🫢


🌸 NAME 🌸

setup-apkcache β€” configure the apk package cache, no cap


πŸŽ€ SYNOPSIS πŸŽ€

setup-apkcache [-h] [DIR]

πŸ¦‹ DESCRIPTION πŸ¦‹

so setup-apkcache literally sets up a local directory for caching apk packages that you downloaded from the network. why do we care? because a cache lets packages be installed before the network is even available β€” like at boot time, bestie. main character energy for your offline era πŸ’…

the directory you pick gets mounted if it needs to be, and then /etc/apk/cache is created as a symbolic link pointing right at it. iconic behavior, honestly.

if you don't hand it a DIR, the script just prompts you interactively. very "let's figure this out together" of it πŸ₯°

and the value none disables caching entirely. periodt.


✨ OPTIONS ✨

  • -h β€” display usage information and then exit. that's it, that's the whole flag. short and sweet πŸ“

🧚 INTERACTIVE MODE 🧚

if you don't pass a DIR argument, the script suggests a cache directory for you. the suggestion gets chosen from this whole list, in order:

  • the current /etc/apk/cache symlink target, if there is one
  • /media/LBU_MEDIA_/cache_ (from lbu.conf)
  • /media/usb/cache (when /dev/usbdisk exists)
  • /var/cache/apk (when root is not on tmpfs)
  • none otherwise

the prompt accepts none if you wanna skip it entirely, or ? for help text that describes the purpose of a local cache. ask questions, babe, it's encouraged πŸ’–


🌈 FILES 🌈

  • /etc/apk/cache β€” symbolic link to the cache directory. the little pointer that could πŸŽ€

⭐ EXIT STATUS ⭐

  • 0 β€” success. slay πŸ’…
  • non-zero β€” an error occurred. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

apk(8), setup-lbu(8), setup-alpine(8) β€” go read those next, iykyk


πŸ’œ AUTHORS πŸ’œ

Natanael Copa <ncopa@alpinelinux.org> and others 🫢


fr fr, one thing to keep in your notes app: /etc/apk/cache being a symlink is the whole trick here, so don't go replacing it with a real directory and then act surprised πŸ™ˆ

Alpine Linux Β· version dated 2026-06-09 Β· SETUP-APKCACHE(8) β€” that's the whole page bestie, go cache some packages, mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from