sudo apt-get purge php7.* # recommended sudo apt-get autoclean sudo apt-get autoremove sudo add-apt-repository ppa:ondrej/php sudo apt-get update # end recommended sudo apt-get install php8.0