2 hours ago · Tech · hide · 0 comments

I like to use Alpine Linux for cloud servers because it’s extremely small, so I don’t have to add extra RAM just to run the operating system. But I like knowing when updated packages are available. You need root to update the local list of available packages first, but that can be automated safely (see below): doas apk update Just asking Alpine is easy, and doesn’t require extra permissions: apk list -u That gives you a detailed list of upgradable packages. Or to get a quieter result with just the names: apk list -uq And this being Linux, it’s easy to get a word count with wc (yes, it’ll count hyphenated package names as a single word): apk list -uq | wc -w Automating the List Updates To get APK to update its package list daily, I’ve put the following in /etc/periodic/daily/apk-update.sh: #!/bin/sh apk update That doesn’t install anything, so it’s safe to let it check on a daily basis. Of course that doesn’t tell me anything, it just makes sure the list is relatively current when I…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.