post_install() {
echo "Deleting files from other versions of pypy3..."
rm -Rf /data/data/com.termux/files/usr/opt/pypy3/lib/pypy*[^3.11]
exit 0
}
pre_remove() {

if [ "pacman" = "debian" ] && [ "$1" != "remove" ]; then
    exit 0
fi

echo "Deleting files from site-packages..."
rm -Rf /data/data/com.termux/files/usr/opt/pypy3/lib/pypy3.11/site-packages/*

echo "Deleting *.pyc..."
find /data/data/com.termux/files/usr/opt/pypy3/lib/ | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf

exit 0
}
