Yesterday I went through both the G-, H-, and J-mission flight plans and the Apollo Operations Handbook looking for the precise sequence of steps that got the cabin to the point where the crew could doff helmets and gloves right after SECO and not suffocate. Some commentators have claimed there was a purge to completely replace the atmosphere with pure oxygen at 5 pisa, but I find no reference to such a step.
Others have correctly pointed out the two pressure gradients -- suit-to-cabin and cabin-to-ambient -- but there is still some confusion in how the mixed cabin atmosphere at ~16 psia arrives at a breathable atmosphere with 5 psi partial-pressure of O2 via venting and feed. I didn't post anything yesterday because I hadn't run the numbers or verified my hypothesis. So today's post contains a fair amount of non-rigorous handwaving. I think part of the confusion could be an unreferenced hysteresis in these valves. A relief valve typically trips at a certain pressure, but then often doesn't close again until the pressure has dropped to a much lower value than the trip pressure. Since this is basic control-system theory, it may not be called out in every document that applies to operating the ECS. The CM cabin vent valve doesn't open until 6 psig. But I'm betting it closes again at something considerably lower, such as 4 psig.
On the other side of the equation, you can have the O2 feed valve open at, say, 4.5 psig and adjust the feed rate so that it doesn't fight the venting. That is, it feeds oxygen at a slower rate than the cabin vent rate, so the cabin relief valve will eventually close -- just not as soon as it would have if there weren't gas also being fed into the cabin. The O2 feed valve could then close at something like 5.5 psig: enough to have filled the cabin substantially with more oxygen, but not so much that the relief valve trips again. The flight plan calls for the to manually pressurize the cabin to 5.7 psia at various points where suit elements are being donned or doffed, and this happens with pure oxygen. So I can see how you could arrange hystereses and feed rates to maintain the overall pressure within a certain range while also gradually increasing the oxygen concentration such that you can take your helmet off at the end of the process without passing out. It just may not be spelled out in so many words in the procedures. That would be something you'd look for in the detailed design specs of the ECS, which I don't have handy at the momen.