I'm creating a package for an application that installs a lot of assets when it first runs. It's looking like they'll have to live in
/var/lib/<myapp>, which is fine. However, because these files aren't part of the original package, dpkg/apt doesn't know to delete them when it's removed. Is there some way to automate this?
I have seen it suggested that I put
rm -rf /var/lib/<myapp> in the
postrm script, but this doesn't seem to play nicely when I install the package over itself (it removes the directory when I don't want it to). Surely there's a built-in way to handle this, in the