Level 56
Use the --only-upgrade flag for the install command.
$ sudo apt --only-upgrade install php7.4*
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have run this $ sudo apt list --upgradable and got many upgrade available:
php7.4-bz2/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-cli/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-common/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-curl/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-fpm/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-gd/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-json/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-mbstring/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-mysql/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-opcache/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-readline/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-xml/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4-zip/focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
php7.4/focal,focal 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 all [upgradable from: 7.4.18-2+ubuntu20.04.1+deb.sury.org+1]
I know that I should run sudo apt install php7.4-{extension_name} php7.4-{another-extension_name} to upgrade them, but is there any simple way to do it?
Please or to participate in this conversation.