# You replaced the age public key in .sops.yaml during a key rotation. Which command makes existing encrypted files readable with the new key without changing their values?

Flux CD, Hard (Expert), Security. https://k8wiz.com/uquiz/you-replaced-the-age-public-key-in-sopsyaml-during-a-key-rotation-which-command-makes-existing-encrypted-files-readable-with-the

- A. sops rotate --in-place on each file
- B. sops encrypt --in-place on each file again
- C. flux reconcile kustomization --with-source
- D. sops updatekeys on each file

**Answer:** sops updatekeys on each file

**Explanation:** sops updatekeys re-encrypts each file's data key for the recipients now listed in .sops.yaml and leaves the encrypted values as they are. sops rotate does something else: it generates a new data key and re-encrypts every value, which you add when a key may have leaked. Both need a private key that can decrypt the file today.
