Bug#1038166: php-imagick: on upgrades /etc/php/7.4/mods-available/imagick.ini is left behind

2023-06-16 Thread Ondřej Surý
Control: severity -1 minor

Oh, I see now. Too much text on too little screen. Sorry. 

I’ll think whether there’s easy way to fix that, but since the conffile is 
still registered with the package, I think this is harmless as purging 
php-imagick will remove the file.

Ondřej
--
Ondřej Surý  (He/Him)

> On 16. 6. 2023, at 20:36, Michael Prokop  wrote:
> 
> Hi,
> 
> * Ondřej Surý [Fri Jun 16, 2023 at 05:04:41PM +0200]:
 On 16. 6. 2023, at 13:19, Michael Prokop  wrote:
>> 
 And I purged all of the php7.4 one
>> 
>> You did not. The rc at the beginning of the line means exactly that.
> 
>> ondrej@calcifer:~$ dpkg -l php7.4-memcached
>> Desired=Unknown/Install/Remove/Purge/Hold
>> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/tri>
>> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
>> ||/ Name Version >
>> +++-->
>> rc  php7.4-memcached 3.1.5+2.2.0-9+0~20210228.30+debian11~1.g>
>> 
>> ondrej@calcifer:~$ sudo dpkg --purge php7.4-memcached
>> (Reading database ... 309586 files and directories currently installed.)
>> Purging configuration files for php7.4-memcached 
>> (3.1.5+2.2.0-9+0~20210228.30+debian11~1.gbp2db493) ...
>> 
>> ondrej@calcifer:~$ dpkg -l php7.4-memcached
>> dpkg-query: no packages found matching php7.4-memcached
>> ondrej@calcifer:~$
> 
> Yeah? I've no idea why you're bringing up php7.4-memcached now, I
> never mentioned this nor had it installed, I also did remove and
> purge *all* the php7.4 packages as you can see from my output
> provided in
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038166#15
> 
> Let me try again, see my STR (repeating from
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038166#15, I once
> again verified it):
> 
>  % podman run --pull=always --rm -i -t debian:bullseye bash
>  # apt update ; apt-get -y install php-imagick
>  [...]
>  # cat > /etc/apt/sources.list << EOF
>  deb http://deb.debian.org/debian bookworm main non-free-firmware
>  deb http://deb.debian.org/debian-security/ bookworm-security main 
> non-free-firmware
>  deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
>  EOF
>  # apt update ; apt-get -y install php-common
>  [...]
>  # dpkg --purge php7.4-cli php7.4-common php7.4-json php7.4-opcache 
> php7.4-phpdbg php7.4-readline
>  # dpkg -S /etc/php/7.4/mods-available/imagick.ini
>  php-imagick: /etc/php/7.4/mods-available/imagick.ini
> 
> And to highlight its result:
> 
>  root@8c0e4100a294:/# dpkg -l | grep php
>  ii  php-common  2:93 all  
> Common files for PHP packages
>  ii  php-imagick 3.7.0-4  amd64
> Provides a wrapper to the ImageMagick library
>  ii  php8.2-cli  8.2.7-1~deb12u1  amd64
> command-line interpreter for the PHP scripting language
>  ii  php8.2-common   8.2.7-1~deb12u1  amd64
> documentation, examples and common module for PHP
>  ii  php8.2-imagick  3.7.0-4  amd64
> Provides a wrapper to the ImageMagick library
>  ii  php8.2-opcache  8.2.7-1~deb12u1  amd64
> Zend OpCache module for PHP
>  ii  php8.2-phpdbg   8.2.7-1~deb12u1  amd64
> server-side, HTML-embedded scripting language (PHPDBG binary)
>  ii  php8.2-readline 8.2.7-1~deb12u1  amd64
> readline module for PHP
>  root@8c0e4100a294:/# dpkg -l | grep -v '^ii'
>  Desired=Unknown/Install/Remove/Purge/Hold
>  | 
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
>  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
>  ||/ NameVersion  Architecture 
> Description
>  
> +++-===---===
>  root@8c0e4100a294:/# dpkg -S /etc/php/7.4/mods-available/imagick.ini
>  php-imagick: /etc/php/7.4/mods-available/imagick.ini
> 
> I really don't see what I should have done wrong, sorry.
> 
> regards
> -mika-



Bug#1038166: php-imagick: on upgrades /etc/php/7.4/mods-available/imagick.ini is left behind

2023-06-16 Thread Michael Prokop
Hi,

* Ondřej Surý [Fri Jun 16, 2023 at 05:04:41PM +0200]:
> > On 16. 6. 2023, at 13:19, Michael Prokop  wrote:

> > And I purged all of the php7.4 one

> You did not. The rc at the beginning of the line means exactly that.

> ondrej@calcifer:~$ dpkg -l php7.4-memcached
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/tri>
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name Version >
> +++-->
> rc  php7.4-memcached 3.1.5+2.2.0-9+0~20210228.30+debian11~1.g>
>
> ondrej@calcifer:~$ sudo dpkg --purge php7.4-memcached
> (Reading database ... 309586 files and directories currently installed.)
> Purging configuration files for php7.4-memcached 
> (3.1.5+2.2.0-9+0~20210228.30+debian11~1.gbp2db493) ...
>
> ondrej@calcifer:~$ dpkg -l php7.4-memcached
> dpkg-query: no packages found matching php7.4-memcached
> ondrej@calcifer:~$

Yeah? I've no idea why you're bringing up php7.4-memcached now, I
never mentioned this nor had it installed, I also did remove and
purge *all* the php7.4 packages as you can see from my output
provided in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038166#15

Let me try again, see my STR (repeating from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038166#15, I once
again verified it):

  % podman run --pull=always --rm -i -t debian:bullseye bash
  # apt update ; apt-get -y install php-imagick
  [...]
  # cat > /etc/apt/sources.list << EOF
  deb http://deb.debian.org/debian bookworm main non-free-firmware
  deb http://deb.debian.org/debian-security/ bookworm-security main 
non-free-firmware
  deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
  EOF
  # apt update ; apt-get -y install php-common
  [...]
  # dpkg --purge php7.4-cli php7.4-common php7.4-json php7.4-opcache 
php7.4-phpdbg php7.4-readline
  # dpkg -S /etc/php/7.4/mods-available/imagick.ini
  php-imagick: /etc/php/7.4/mods-available/imagick.ini

And to highlight its result:

  root@8c0e4100a294:/# dpkg -l | grep php
  ii  php-common  2:93 all  
Common files for PHP packages
  ii  php-imagick 3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
  ii  php8.2-cli  8.2.7-1~deb12u1  amd64
command-line interpreter for the PHP scripting language
  ii  php8.2-common   8.2.7-1~deb12u1  amd64
documentation, examples and common module for PHP
  ii  php8.2-imagick  3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
  ii  php8.2-opcache  8.2.7-1~deb12u1  amd64
Zend OpCache module for PHP
  ii  php8.2-phpdbg   8.2.7-1~deb12u1  amd64
server-side, HTML-embedded scripting language (PHPDBG binary)
  ii  php8.2-readline 8.2.7-1~deb12u1  amd64
readline module for PHP
  root@8c0e4100a294:/# dpkg -l | grep -v '^ii'
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ NameVersion  Architecture 
Description
  
+++-===---===
  root@8c0e4100a294:/# dpkg -S /etc/php/7.4/mods-available/imagick.ini
  php-imagick: /etc/php/7.4/mods-available/imagick.ini

I really don't see what I should have done wrong, sorry.

regards
-mika-


signature.asc
Description: PGP signature


Bug#1038166: php-imagick: on upgrades /etc/php/7.4/mods-available/imagick.ini is left behind

2023-06-16 Thread Ondřej Surý



> 
> On 16. 6. 2023, at 13:19, Michael Prokop  wrote:
> 
> And I purged all of the php7.4 one

You did not. The rc at the beginning of the line means exactly that.

ondrej@calcifer:~$ dpkg -l php7.4-memcached
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/tri>
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version >
+++-->
rc  php7.4-memcached 3.1.5+2.2.0-9+0~20210228.30+debian11~1.g>

ondrej@calcifer:~$ sudo dpkg --purge php7.4-memcached
(Reading database ... 309586 files and directories currently installed.)
Purging configuration files for php7.4-memcached 
(3.1.5+2.2.0-9+0~20210228.30+debian11~1.gbp2db493) ...


ondrej@calcifer:~$ dpkg -l php7.4-memcached
dpkg-query: no packages found matching php7.4-memcached
ondrej@calcifer:~$

--
Ondřej Surý  (He/Him)


Bug#1038166: php-imagick: on upgrades /etc/php/7.4/mods-available/imagick.ini is left behind

2023-06-16 Thread Michael Prokop
Hi,

* Ondřej Surý [Fri Jun 16, 2023 at 12:26:39PM +0200]:

> You have just removed but not purged the php7.4 packages, so that’s expected.

As stated, those are all php* packages that exist(ed) on the system:

> > | # dpkg -l | grep php
> > | ii  php-common  2:93 all  
> > Common files for PHP packages
> > | ii  php-imagick 3.7.0-4  amd64
> > Provides a wrapper to the ImageMagick library
> > | rc  php7.4-cli  7.4.33-1+deb11u4 amd64
> > command-line interpreter for the PHP scripting language
> > | rc  php7.4-common   7.4.33-1+deb11u4 amd64
> > documentation, examples and common module for PHP
> > | rc  php7.4-json 7.4.33-1+deb11u4 amd64
> > JSON module for PHP
> > | rc  php7.4-opcache  7.4.33-1+deb11u4 amd64
> > Zend OpCache module for PHP
> > | rc  php7.4-phpdbg   7.4.33-1+deb11u4 amd64
> > server-side, HTML-embedded scripting language (PHPDBG binary)
> > | rc  php7.4-readline 7.4.33-1+deb11u4 amd64
> > readline module for PHP
> > | ii  php8.2-cli  8.2.7-1~deb12u1  amd64
> > command-line interpreter for the PHP scripting language
> > | ii  php8.2-common   8.2.7-1~deb12u1  amd64
> > documentation, examples and common module for PHP
> > | ii  php8.2-imagick  3.7.0-4  amd64
> > Provides a wrapper to the ImageMagick library
> > | ii  php8.2-opcache  8.2.7-1~deb12u1  amd64
> > Zend OpCache module for PHP
> > | ii  php8.2-phpdbg   8.2.7-1~deb12u1  amd64
> > server-side, HTML-embedded scripting language (PHPDBG binary)
> > | ii  php8.2-readline 8.2.7-1~deb12u1  amd64
> > readline module for PHP

And I purged all of the php7.4 ones (as stated):

| root@d17a279d1015:/# dpkg -l | grep php
| ii  php-common  2:93 all  
Common files for PHP packages
| ii  php-imagick 3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
| rc  php7.4-cli  7.4.33-1+deb11u4 amd64
command-line interpreter for the PHP scripting language
| rc  php7.4-common   7.4.33-1+deb11u4 amd64
documentation, examples and common module for PHP
| rc  php7.4-json 7.4.33-1+deb11u4 amd64
JSON module for PHP
| rc  php7.4-opcache  7.4.33-1+deb11u4 amd64
Zend OpCache module for PHP
| rc  php7.4-phpdbg   7.4.33-1+deb11u4 amd64
server-side, HTML-embedded scripting language (PHPDBG binary)
| rc  php7.4-readline 7.4.33-1+deb11u4 amd64
readline module for PHP
| ii  php8.2-cli  8.2.7-1~deb12u1  amd64
command-line interpreter for the PHP scripting language
| ii  php8.2-common   8.2.7-1~deb12u1  amd64
documentation, examples and common module for PHP
| ii  php8.2-imagick  3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
| ii  php8.2-opcache  8.2.7-1~deb12u1  amd64
Zend OpCache module for PHP
| ii  php8.2-phpdbg   8.2.7-1~deb12u1  amd64
server-side, HTML-embedded scripting language (PHPDBG binary)
| ii  php8.2-readline 8.2.7-1~deb12u1  amd64
readline module for PHP
| root@d17a279d1015:/# dpkg --purge php7.4-cli php7.4-common php7.4-json 
php7.4-opcache php7.4-phpdbg php7.4-readline
| (Reading database ... 11733 files and directories currently installed.)
| Purging configuration files for php7.4-cli (7.4.33-1+deb11u4) ...
| Purging configuration files for php7.4-common (7.4.33-1+deb11u4) ...
| Purging configuration files for php7.4-json (7.4.33-1+deb11u4) ...
| dpkg: warning: while removing php7.4-json, directory 
'/etc/php/7.4/mods-available' not empty so not removed
| Purging configuration files for php7.4-opcache (7.4.33-1+deb11u4) ...
| Purging configuration files for php7.4-phpdbg (7.4.33-1+deb11u4) ...
| dpkg: warning: while removing php7.4-phpdbg, directory '/etc/php/7.4' not 
empty so not removed
| Purging configuration files for php7.4-readline (7.4.33-1+deb11u4) ...
| root@d17a279d1015:/# dpkg -l | grep php
| ii  php-common  2:93 all  
Common files for PHP packages
| ii  php-imagick 3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
| ii  php8.2-cli  8.2.7-1~deb12u1  amd64
command-line interpreter for the PHP scripting language
| ii 

Bug#1038166: php-imagick: on upgrades /etc/php/7.4/mods-available/imagick.ini is left behind

2023-06-16 Thread Ondřej Surý
You have just removed but not purged the php7.4 packages, so that’s expected.

--
Ondřej Surý  (He/Him)

> On 16. 6. 2023, at 11:39, Michael Prokop  wrote:
> 
> Package: php-imagick
> Version: 3.7.0-4
> Severity: important
> 
> Hi,
> 
> this might be related to #951847, I stumbled upon this behavior
> during an upgrade of a Debian system from bullseye to bookworm,
> where only file /etc/php/7.4/mods-available/imagick.ini is left
> behind.
> 
> System based on bullseye looking as follows:
> 
> | # ls -la /etc/php/7.4/mods-available/
> | total 92
> | drwxr-xr-x 2 root root 4096 Jun 16 09:15 .
> | drwxr-xr-x 5 root root 4096 Jun 16 09:15 ..
> | -rw-r--r-- 1 root root   74 Jun  9 16:51 calendar.ini
> | -rw-r--r-- 1 root root   71 Jun  9 16:51 ctype.ini
> | -rw-r--r-- 1 root root   70 Jun  9 16:51 exif.ini
> | -rw-r--r-- 1 root root   69 Jun  9 16:51 ffi.ini
> | -rw-r--r-- 1 root root   74 Jun  9 16:51 fileinfo.ini
> | -rw-r--r-- 1 root root   69 Jun  9 16:51 ftp.ini
> | -rw-r--r-- 1 root root   73 Jun  9 16:51 gettext.ini
> | -rw-r--r-- 1 root root   71 Jun  9 16:51 iconv.ini
> | -rw-r--r-- 1 root root   60 Mar  5  2021 imagick.ini
> | -rw-r--r-- 1 root root   68 Jun  9 16:51 json.ini
> | -rw-r--r-- 1 root root   79 Jun  9 16:51 opcache.ini
> | -rw-r--r-- 1 root root   69 Jun  9 16:51 pdo.ini
> | -rw-r--r-- 1 root root   70 Jun  9 16:51 phar.ini
> | -rw-r--r-- 1 root root   71 Jun  9 16:51 posix.ini
> | -rw-r--r-- 1 root root   76 Jun  9 16:51 readline.ini
> | -rw-r--r-- 1 root root   71 Jun  9 16:51 shmop.ini
> | -rw-r--r-- 1 root root   73 Jun  9 16:51 sockets.ini
> | -rw-r--r-- 1 root root   73 Jun  9 16:51 sysvmsg.ini
> | -rw-r--r-- 1 root root   73 Jun  9 16:51 sysvsem.ini
> | -rw-r--r-- 1 root root   73 Jun  9 16:51 sysvshm.ini
> | -rw-r--r-- 1 root root   75 Jun  9 16:51 tokenizer.ini
> | # cat /etc/php/7.4/mods-available/imagick.ini
> | ; configuration for php imagick module
> | extension=imagick.so
> 
> Then after upgrading the system to bookworm and applying
> configuration file cleanup:
> 
> | # dpkg -l | grep php
> | ii  php-common  2:93 all  
> Common files for PHP packages
> | ii  php-imagick 3.7.0-4  amd64
> Provides a wrapper to the ImageMagick library
> | rc  php7.4-cli  7.4.33-1+deb11u4 amd64
> command-line interpreter for the PHP scripting language
> | rc  php7.4-common   7.4.33-1+deb11u4 amd64
> documentation, examples and common module for PHP
> | rc  php7.4-json 7.4.33-1+deb11u4 amd64
> JSON module for PHP
> | rc  php7.4-opcache  7.4.33-1+deb11u4 amd64
> Zend OpCache module for PHP
> | rc  php7.4-phpdbg   7.4.33-1+deb11u4 amd64
> server-side, HTML-embedded scripting language (PHPDBG binary)
> | rc  php7.4-readline 7.4.33-1+deb11u4 amd64
> readline module for PHP
> | ii  php8.2-cli  8.2.7-1~deb12u1  amd64
> command-line interpreter for the PHP scripting language
> | ii  php8.2-common   8.2.7-1~deb12u1  amd64
> documentation, examples and common module for PHP
> | ii  php8.2-imagick  3.7.0-4  amd64
> Provides a wrapper to the ImageMagick library
> | ii  php8.2-opcache  8.2.7-1~deb12u1  amd64
> Zend OpCache module for PHP
> | ii  php8.2-phpdbg   8.2.7-1~deb12u1  amd64
> server-side, HTML-embedded scripting language (PHPDBG binary)
> | ii  php8.2-readline 8.2.7-1~deb12u1  amd64
> readline module for PHP
> | # dpkg --purge php7.4-cli php7.4-common php7.4-json php7.4-opcache 
> php7.4-phpdbg php7.4-readline
> | [...]
> 
> Then only `/etc/php/7.4/mods-available/imagick.ini` is left behind:
> 
> | # ls -la /etc/php/7.4/mods-available/
> | total 12
> | drwxr-xr-x 2 root root 4096 Jun 16 09:25 .
> | drwxr-xr-x 3 root root 4096 Jun 16 09:25 ..
> | -rw-r--r-- 1 root root   60 Mar  5  2021 imagick.ini
> |
> | # ls -la /etc/php/7.4/mods-available/imagick.ini
> | -rw-r--r-- 1 root root 60 Mar  5  2021
> | /etc/php/7.4/mods-available/imagick.ini
> | # dpkg -S /etc/php/7.4/mods-available/imagick.ini
> | php-imagick: /etc/php/7.4/mods-available/imagick.ini
> 
> Something feels wrong here?
> 
> FTR:
> 
> | # apt-cache policy php-imagick php8.2-imagick
> | php-imagick:
> |   Installed: 3.7.0-4
> |   Candidate: 3.7.0-4
> |   Version table:
> |  *** 3.7.0-4 500
> | 500 http://deb.debian.org/debian bookworm/main amd64 Packages
> | 100 /var/lib/dpkg/status
> | php8.2-imagick:
> |   Installed: 3.7.0-4
> |   Candidate: 3.7.0-4
> |   Version table:
> |  *** 3.7.0-4 500
> | 500 http://deb.debian.org/debian bookworm/main amd64 Packages
> | 100 /var/lib/dpkg/status
> |
> | # dpkg -L php-imagick
> | 

Bug#1038166: php-imagick: on upgrades /etc/php/7.4/mods-available/imagick.ini is left behind

2023-06-16 Thread Michael Prokop
Package: php-imagick
Version: 3.7.0-4
Severity: important

Hi,

this might be related to #951847, I stumbled upon this behavior
during an upgrade of a Debian system from bullseye to bookworm,
where only file /etc/php/7.4/mods-available/imagick.ini is left
behind.

System based on bullseye looking as follows:

| # ls -la /etc/php/7.4/mods-available/
| total 92
| drwxr-xr-x 2 root root 4096 Jun 16 09:15 .
| drwxr-xr-x 5 root root 4096 Jun 16 09:15 ..
| -rw-r--r-- 1 root root   74 Jun  9 16:51 calendar.ini
| -rw-r--r-- 1 root root   71 Jun  9 16:51 ctype.ini
| -rw-r--r-- 1 root root   70 Jun  9 16:51 exif.ini
| -rw-r--r-- 1 root root   69 Jun  9 16:51 ffi.ini
| -rw-r--r-- 1 root root   74 Jun  9 16:51 fileinfo.ini
| -rw-r--r-- 1 root root   69 Jun  9 16:51 ftp.ini
| -rw-r--r-- 1 root root   73 Jun  9 16:51 gettext.ini
| -rw-r--r-- 1 root root   71 Jun  9 16:51 iconv.ini
| -rw-r--r-- 1 root root   60 Mar  5  2021 imagick.ini
| -rw-r--r-- 1 root root   68 Jun  9 16:51 json.ini
| -rw-r--r-- 1 root root   79 Jun  9 16:51 opcache.ini
| -rw-r--r-- 1 root root   69 Jun  9 16:51 pdo.ini
| -rw-r--r-- 1 root root   70 Jun  9 16:51 phar.ini
| -rw-r--r-- 1 root root   71 Jun  9 16:51 posix.ini
| -rw-r--r-- 1 root root   76 Jun  9 16:51 readline.ini
| -rw-r--r-- 1 root root   71 Jun  9 16:51 shmop.ini
| -rw-r--r-- 1 root root   73 Jun  9 16:51 sockets.ini
| -rw-r--r-- 1 root root   73 Jun  9 16:51 sysvmsg.ini
| -rw-r--r-- 1 root root   73 Jun  9 16:51 sysvsem.ini
| -rw-r--r-- 1 root root   73 Jun  9 16:51 sysvshm.ini
| -rw-r--r-- 1 root root   75 Jun  9 16:51 tokenizer.ini
| # cat /etc/php/7.4/mods-available/imagick.ini
| ; configuration for php imagick module
| extension=imagick.so

Then after upgrading the system to bookworm and applying
configuration file cleanup:

| # dpkg -l | grep php
| ii  php-common  2:93 all  
Common files for PHP packages
| ii  php-imagick 3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
| rc  php7.4-cli  7.4.33-1+deb11u4 amd64
command-line interpreter for the PHP scripting language
| rc  php7.4-common   7.4.33-1+deb11u4 amd64
documentation, examples and common module for PHP
| rc  php7.4-json 7.4.33-1+deb11u4 amd64
JSON module for PHP
| rc  php7.4-opcache  7.4.33-1+deb11u4 amd64
Zend OpCache module for PHP
| rc  php7.4-phpdbg   7.4.33-1+deb11u4 amd64
server-side, HTML-embedded scripting language (PHPDBG binary)
| rc  php7.4-readline 7.4.33-1+deb11u4 amd64
readline module for PHP
| ii  php8.2-cli  8.2.7-1~deb12u1  amd64
command-line interpreter for the PHP scripting language
| ii  php8.2-common   8.2.7-1~deb12u1  amd64
documentation, examples and common module for PHP
| ii  php8.2-imagick  3.7.0-4  amd64
Provides a wrapper to the ImageMagick library
| ii  php8.2-opcache  8.2.7-1~deb12u1  amd64
Zend OpCache module for PHP
| ii  php8.2-phpdbg   8.2.7-1~deb12u1  amd64
server-side, HTML-embedded scripting language (PHPDBG binary)
| ii  php8.2-readline 8.2.7-1~deb12u1  amd64
readline module for PHP
| # dpkg --purge php7.4-cli php7.4-common php7.4-json php7.4-opcache 
php7.4-phpdbg php7.4-readline
| [...]

Then only `/etc/php/7.4/mods-available/imagick.ini` is left behind:

| # ls -la /etc/php/7.4/mods-available/
| total 12
| drwxr-xr-x 2 root root 4096 Jun 16 09:25 .
| drwxr-xr-x 3 root root 4096 Jun 16 09:25 ..
| -rw-r--r-- 1 root root   60 Mar  5  2021 imagick.ini
|
| # ls -la /etc/php/7.4/mods-available/imagick.ini
| -rw-r--r-- 1 root root 60 Mar  5  2021
| /etc/php/7.4/mods-available/imagick.ini
| # dpkg -S /etc/php/7.4/mods-available/imagick.ini
| php-imagick: /etc/php/7.4/mods-available/imagick.ini

Something feels wrong here?

FTR:

| # apt-cache policy php-imagick php8.2-imagick
| php-imagick:
|   Installed: 3.7.0-4
|   Candidate: 3.7.0-4
|   Version table:
|  *** 3.7.0-4 500
| 500 http://deb.debian.org/debian bookworm/main amd64 Packages
| 100 /var/lib/dpkg/status
| php8.2-imagick:
|   Installed: 3.7.0-4
|   Candidate: 3.7.0-4
|   Version table:
|  *** 3.7.0-4 500
| 500 http://deb.debian.org/debian bookworm/main amd64 Packages
| 100 /var/lib/dpkg/status
|
| # dpkg -L php-imagick
| /.
| /usr
| /usr/share
| /usr/share/doc
| /usr/share/doc/php-imagick
| /usr/share/doc/php-imagick/changelog.Debian.gz
| /usr/share/doc/php-imagick/copyright
| /etc/php/7.4/mods-available/imagick.ini
|
| # cat /var/lib/dpkg/info/php-imagick.list
| /.
| /usr
| /usr/share
| /usr/share/doc
| /usr/share/doc/php-imagick
| /usr/share/doc/php-imagick/changelog.Debian.gz
|