Considering donating if you found my post helpful 😊
If you are removing, purging, and wanted to reinstall packages in Debian and its derivatives, you might stumbled upon these errors and warnings:
Not replacing deleted config file /etc/php/8.4/mods-available/opcache.ini
WARNING: Module opcache ini file doesn't exist under /etc/php/8.4/mods-available
These are generic messages and not specific to PHP as in my example.
These happen because some you have deleted config files manually after removing the packages. For some reasons, the system still keeping track of them.
Solution:
What you need to do is simple, purge all those packages properly. For example,
$ sudo apt purge  php8.4
$ sudo apt autoremove --purge
Purge all config files with apt and you are good to go to reinstall them.
Considering donating if you found my post helpful 😊