Great question and the answer is it depends. Most of the time, and I know I can get myself in trouble by saying that, but most of the time you keep them.
Most deals are structured as asset sales, and you keep both the accounts payable, and accounts receivable. We include specific language in the contract at the time of sale that will address who keeps the receivables and how they are paid, that way you are protected.
It is important as you get prepared for a sale to know exactly what your both your accounts receivable and accounts payable are, that allows you to make a more informed decision when an offer is presented. I would strongly suggest if you are not doing so already, to keep a detailed list so as you get ready to close, you have one less thing to track down.