HEX
Server: nginx/1.24.0
System: Linux webserver 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: wpuser (1002)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //var/lib/dpkg/info/netplan.io.preinst
#!/bin/sh

set -e

# Cleanup .pyc cached files from netplan.io versions older than 0.107-3.
# After 0.107-3, the noncli-related code was moved away from
# share/netplan/netplan, thanks to the new python3-netplan package,
# but dpkg would leave this directory behind due to the .pyc files.
# Cleaning it up here will leave the directory empty so dpkg will remove
# it properly during the update process.

if [ -d /usr/share/netplan/netplan ]; then
    find /usr/share/netplan/netplan/ -name '*.pyc' -delete
    find /usr/share/netplan/netplan/ -name '__pycache__' -delete
fi