Rite Aid, once among America's largest pharmacy chains, has closed all of its remaining stores - including about two dozen in the Bay Area - after years of financial struggles.