Hidden files in /var/db/receipts deleted after upgrade

CCNapier
Contributor

Just looking at finally upgrading our devices from El Cap to Sierra (Casper 9.101).
After upgrading successfully, some of our "flag" files that we placed in the /var/db/receipts folder have gone.

e.g. /var/db/receipts/.owned

We use this flag to put the Mac into a specific dynamic group.
Any idea why this is deleted after an upgrade?
- Best way to retain it?
- Maybe better place to be adding these type of "flags"?

2 REPLIES 2

tramscloud
New Contributor

I would put it in /var/db instead of /var/db/receipts, we put marker files in /var/db and they're always left in place after OS upgrades.

It is probably being deleted because it's not a valid receipt.

I hope that helps.

CCNapier
Contributor

Thanks. Works as intended in that area.