Upgrade Alpine Linux without upgrading certain packages
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Upgrade Alpine Linux without upgrading certain packages
I have "NextCloud" installed in the docker. Docker (downloaded from GitHub) is based on Alpine Linux. As you know, Linux used in docker is not complete. I'd like to do automatic update/upgrade from cron. However, I would not like the upgrade to be performed on NextCloud packages, because I intend to use (for various reasons) a tool built into Nextcloud itself for this purpose.
However, the "apk" command doesn't have the "--exclude" option. So how can I upgrade the system without doing it on all "nextcloud*" packages?
AFAIU Alpine is a rolling release distro, which means that full upgrades are highly recommended, if not mandatory.
Be that as it may, I'm sure the Alpine Wiki can tell you how apk can be configured, and what other apk-tools exist besides the "apk" utility.
The apk tool supports the following operations:
add Add new packages or upgrade packages to the running system
del Delete packages from the running system
fix Attempt to repair or upgrade an installed package
update Update the index of available packages
info Prints information about installed or available packages
search Search for packages or descriptions with wildcard patterns
upgrade Upgrade the currently installed packages
cache Maintenance operations for locally cached package repository
version Compare version differences between installed and available packages
index create a repository index from a list of packages
fetch download (but not install) packages
audit List changes to the file system from pristine package install state
verify Verify a package signature
dot Create a graphviz graph description for a given package
policy Display the repository that updates a given package, plus repositories that also offer the package
stats Display statistics, including number of packages installed and available, number of directories and files, etc.
manifest Display checksums for files contained in a given package
No "exclude" option or similar possibility. Lets take "apt". It is possible exclude packages from upgrade, but not in "apk".
So any replacement is possible? Any script or so...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.