Skip to main content
Question

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

  • December 15, 2017
  • 2 replies
  • 17 views

Forum|alt.badge.img+9

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

Forum|alt.badge.img
  • New Contributor
  • December 15, 2017

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.


Forum|alt.badge.img+9
  • Author
  • Contributor
  • December 18, 2017

Thanks. Works as intended in that area.