Rite Aid Corp. on Wednesday posted a big jump in quarterly profit as the drug store retailer benefited from its ongoing sale of 1,932 stores to Walgreens Boots Alliance Inc.

Net income rose to $81.03 million, or 8 cents per share, in the quarter ended Dec. 2, from $15.01 million, or 1 cent per share, in the year-ago period. Analysts had projected a loss of two cents per share.

Total revenue fell 5.6% to $5.4 billion from $5.7 billion last year. Same-store sales fell 2.5%, consisting of a 3.5% decline…