Upon any sale as provided in § 10-5-27, the attaching officer shall first apply so much of the proceeds of the sale as may be necessary to pay the amount for which the property was mortgaged, with such deduction for interest for the anticipated payment, or allowance for damages for the anticipated payment, as may be allowed by the justice directing the sale; and the officer shall pay only the balance into the registry of the court for the purposes of the attachment.
R.I. Gen. Laws § 10-5-28