If anything they're filling in the gaps walmart made for them.
Walmart opens and closes all the small mom and pop grocery stores for miles, we're talking up to an hour drive away. Everyone that can drive an hour does because it's cheaper. So stores close in a wide radius around a new Walmart.
Now you have these poorly connected rural areas that no longer have stores. The few people that can't drive the hour to the Walmart are pretty throughly fucked.
Usually the only thing left are gas stations. They sell a few essentials, but they are prohibitively expensive. That's where Dollar General steps in. They still out-compete any small buisness on prices, but they are usually more than Walmart. However they are priced close enough to make the drive to a walmart less practical for those that can. For those that can't drive that distance they become their only source of groceries