apt install keep skip alternatives


To keep php7.2 default
before apt change priority value 72 -> 92 to keep this value biggest

/var/lib/dpkg/alternatives/php
/var/lib/dpkg/alternatives/php-fpm.sock

update-alternatives --query php
Name: php
Link: /usr/bin/php
Slaves:
php.1.gz /usr/share/man/man1/php.1.gz
Status: auto
Best: /usr/bin/php7.2
Value: /usr/bin/php7.2

Alternative: /usr/bin/php7.2
Priority: 92
Slaves:
php.1.gz /usr/share/man/man1/php7.2.1.gz

Alternative: /usr/bin/php7.4
Priority: 74
Slaves:
php.1.gz /usr/share/man/man1/php7.4.1.gz

Leave a Reply

Your email address will not be published. Required fields are marked *