What is everyone doing to clean and reinstall O-rings?

I recently had an enclosure flood due to a dirty O-ring, and I’m looking for some advice to build a process to prevent this in the future.