Debian packing Python Policy says that postinst should generate pyc files and prerm should remove them.
This bug is about cleanup, so see bug 3846 for a possible reason to enable compiling on installation.
*** Bug 7586 has been marked as a duplicate of this bug. ***
See bug 7586 for details on how this works for normal Debian packages.
When uninstalling with "apt purge thinlinc-server" on Debian 12, I got the warnings below, in addition to the ones we see that are caused by lingering pyc-files. > dpkg: warning: while removing thinlinc-server, directory '/var/lib/vsm' not empty so not removed > dpkg: warning: while removing thinlinc-server, directory '/var/opt/thinlinc/sessions' not empty so not removed > dpkg: warning: while removing thinlinc-server, directory '/var/opt/thinlinc/statistics' not empty so not removed
The warnings in comment 4 were seen when uninstalling server 4.16.0 and 4.16.0post_3549.