Twenty years ago David Bowie watched what the internet was doing to his industry and predicted that music would become a commodity like “running water or electricity”.

“The absolute transformation of everything that we ever thought about music will take place within ten years and nothing is going to be able to stop it . . . I’m fully confident that copyright, for instance, will no longer exist in ten years,” he said in 2002.

It appears that the Thin White Duke was only half right, as his entire songwriting catalogue has just been sold to Warner Music for an estimated $250 million (£185 million). The sale includes classics such as Heroes, Starman, Space Oddity and Let’s Dance, in the latest big deal for the sale of music rights.

Warner’s music publishing division, Warner Chappell, said that the agreement included all of Bowie’s work from 1968 to his final album Blackstar, released just before his death in 2016. It covers more than four hundred songs and also includes two studio albums from his short-lived 1980s band Tin Machine and the posthumous release Toy, which comes out on Friday.

The price of the deal was not disclosed but Variety, which was the first to report the sale, said the figure was “upwards of $250 million”.

Songs have two copyrights: one for the songwriting and one for the recording. Bowie’s estate, which he left to his second wife Iman and two children, had already agreed a long-term licensing deal with Warner Music in September for his recorded music catalogue.

Warner’s deal is the latest in a string of huge transactions for the music rights to some of the world’s best-known artists. Last month Bruce Springsteen sold his catalogue as both songwriter and recording artist to Sony for $550 million. Last year Bob Dylan sold his entire catalogue to Universal Music for an estimated $300 million. Such deals mean that a record label collects income from the artist’s royalties, licensing, brand deals and other revenue streams that would have gone to the artist.