I've been doing this since about 1998, when iUniverse set up a Back-in-Print facsimile option with the Author's Guild. Happily, that was before ebooks meant anything, and my publisher was Doubleday, so the process was handled by return mail. (Three novels in total.) I suppose that now with ebooks they are much stickier. The old rule was that one could demand a reversion of royalties by demanding that the publisher put out a new edition within six months, and none of course was willing to do that with a backlist book by a bottom-list author. But an ebook can be eternally in "print" so that logic no longer applies.
Amazon will never take down a listing for a print edition, because there may always be booksellers with secondhand or remaindered copies. But ebooks ought to come down right away. Alas, this doesn't always happen. When DTP/KDP came along, and CreateSpace, I got my rights back from iUniverse for all those books, some of which were also available as ebooks. The ebooks stuck around for quite a while. (And the danged paperbacks are still there, of course, though I wish they weren't and have unsuccessfully lobbied Amazon to get rid of the listings.)
If there is both a legitimate and a "spurious" listing (that is, the original publisher's listing plus another put up by a bookseller somewhere), Amazon will usually delete the spurious one. I love that term, spurious, which was suggested by a poster on the KDP forums, and have used it several times since. One of my books has EIGHT listings for the hardcover and paperback editions from the original publisher, a university press. Very annoying, since if someone clicks on the Kindle edition, say, there pops up a link to the hardcover edition, which may even be cheaper, and if the shopper checks out that link, the link to the ebook sometimes vanishes.
I also have a couple books on Amazon that I wrote in the nose-to-grindstone years after I got married and before our daughter graduated college, that I wish people would forget about, but Amazon won't take the listings down because they're legitimate. (Nor will Amazon de-link them from my Author Central account!)