This warehouse is being built to house the books and journals that no one wants. With the British Library's UK collection growing at a rate of 12.5km of shelf space a year, is the notion of the copyright library really sustainable? Stuart Jeffries reports

We used to build cathedrals. Now we build warehouses. One of the most extraordinary examples of our costly new dalliance with warehouse technology is rising on an industrial estate in West Yorkshire. As I drive past Leeds United's training ground and past HM Prison Wealstun, an epic grey corrugated temple looms ominously. It dominates the landscape around Boston Spa, just as Ely Cathedral commands the Fens or as Chartres Cathedral surmounts the countryside for miles around. All it needs is a spire.

The warehouse is extraordinary because, unlike all those monstrous Tesco and Amazon depositories that litter the fringes of the motorways of the Midlands, it is being meticulously constructed to house things that no one wants. When it is complete next year, this warehouse will be state-of-the-art, containing 262 linear kilometres of high-density, fully automated storage in a low-oxygen environment. It will house books, journals and magazines that many of us have forgotten about or have never heard of in the first place.

Chris Fletcher, the warehouse's project manager for the past 11 months, is extremely proud of it. "Normal atmosphere consists 20% oxygen. This will regulate oxygen in the warehouse to between 15.8 and 16.2%, with a mean of 16%, which will ensure minimal damage to the books in store. The air-conditioning will ensure 52.5% humidity plus or minus 5%. It will ensure a steady state temperature. The whole building will be sealed to protect the contents. It will," he says puffing his chest a little, "comply with British Standard 5454. Amazing, isn't it?"

It certainly is. We're standing in hard hats and wellies inside the warehouse, which at present is a huge shell. It reminds me of visiting an empty power station in south London before they started filling it with art galleries and calling it Tate Modern: the scale induces awe. This will be the £20 million new depository at the British Library's Yorkshire complex in Boston Spa near Leeds. It is where, before this century reaches its teens, copies of books spared a quick death at the pulping plant - thanks to the grace of the provisions of the 1911 Copyright Act and later government legislation - will go to serve their life sentences in a secure environment. "We need this warehouse," says Steve Morris, the British Library's head of finance, "not just because it is cheaper than existing rented warehouses we use in London, but also because we are statutorily obliged to house more and more material. Seven million items, many of them books, will go there. The death of the book has been grossly exaggerated, you see."

Indeed, the problem for our great libraries is that books won't stop coming. The British Library's UK national collection is currently expanding at the rate of 12.5 kilometres of shelf space a year, and somewhere has to be found to put it all. In 1911, the notion of the copyright library was born, when Parliament decided that the British Library along with five others in Great Britain and Ireland would be entitled to receive a free copy of every item published. But, while the other five - the Bodleian at Oxford, Cambridge University Library, Trinity College Library in Dublin, and the National Libraries of Scotland and Wales - have a right to claim any book published in the UK, in practice not all are. Cambridge University Library, for example, estimates that only between 70% and 80% of everything published in the UK are deposited there (they can also request anything within one year of publication). By contrast, the British Library must receive a copy of everything published in the UK each year.

The British Library, you see, strives to live up to its self-imposed title of "the world's knowledge". That knowledge, though, is an odd thing. Along with the Magna Carta and the Gutenberg Bible, it includes Everybody Poos, by Taro Gomi (to help kids over toilet phobias). Not to mention Wayne Rooney's autobiography, Jordan's novel and a book called Do Ants Have Arseholes And 101 Other Bloody Ridiculous Questions. The MPs who in 1911 established the legal deposit principle for the five greatest libraries in the British Isles probably didn't realise the full consequences of their decision.

Peter Fox, head librarian at Cambridge University Library, reckons between 60,000 and 100,000 books are published each year, and anticipates no decline any time soon. What's more, the British Library commissioned research into publishing trends up to 2020 and found that the annual UK output of monographs, currently standing at 150,000 a year, is set to increase by 100% between now and 2020. You might think that the evolution of publishing into cyberspace might soothe the headaches of those librarians charged with deciding where all this stuff can be housed, but you would be wrong. True, the British Library reckons that by 2020 25% of newspapers will be published solely in e-format with virtually none published solely in print, and that by the same year 40% of UK monographs will be in e-format only, but current library policy is to acquire a printed format of a publication even when it exists in electronic form, partly because there isn't yet sufficient confidence in digital formats to justify doing otherwise.

Think about it: CD-ROMs used to be the future. Now they join VCRs, Walkmans and 8-track machines in the technological dustbin. Indeed, the CD-ROM became outmoded so quickly that it is difficult to transfer material from them to more modern digital formats. Who knows which current digital formats will go the way of CD-ROMs in future? "PDFs seem pretty good, but who knows?" Fox says. So, for a few more decades, at the very least, our great libraries will not give up on the printed form. As a result, their employees will have to worry about where to put them, as well as how to conserve their extant, priceless collections as well as possible.

What, in these challenging times for our libraries, will wind up in this vast new warehouse? Books that no one reads, magazines that have never been opened, abstruse journals with even pottier titles than the ones satirised on Have I Got News For You. If Potato Farmers' Weekly, Nylon Jumpsuit Enthusiasts' Quarterly or Postcard Collectors' Digest exist, then they will surely find a place to languish in optimum conservation conditions in this postmodern temple. They will be kept in plastic totes that can be removed from their stacks. If, for example, someone is doing a PhD on the evolution of TV listings in the late 20th century, a tote containing TV Quicks from June 1997 would be lifted from their shelves, the magazines disinterred from their plastic tomb, and, most likely, put on the daily shuttle to the Library's reading room in St Pancras, London, 250 miles away. But, no doubt, only after some of the eight British Library staff who will work in the depository have raised their eyebrows at the thought of someone actually wanting to read this stuff.

"We're essentially relocating nil to low use material from rented warehouses in London to a cheaper facility where the material will be kept in conditions that ensure it is kept as pristine as possible," says Dawn Olney, head of collection storage at the British Library, and thus one of the key people responsible for the mind-bending logistical problems of deciding what - of the Library's collection of 13 million books, 920,000 journal and newspaper titles, 57 million patents, three million sound recordings, not to mention publications that exist only in cyberspace - should go where.

Can't you just decide that Barbara Cartland's 95th novel is rubbish and so store it in a pit for all eternity? "It doesn't work like that," Olney giggles. "We have to use objective criteria. We divide the material into metres and if there are no uses per metre per year, it is categorised nil use. If it's zero to three uses per metre per year, it's low use. Three to five uses is medium use and will be kept at St Pancras. More ephemeral material of low appeal now will go north."

Please tell me my book isn't nil use, I bleat. Sensibly, Olney won't be drawn. "It's actually quite surprising what is low use. We'll be shipping north lots of periodicals like Time Out and those sorts of magazines. We'll have magazines like Country Life, which are very valuable but low use. All those magazines with CDs we'll be sending up north - with the CDs attached.

"What we found when we moved to St Pancras is that some material you'd expect to be low use is high use, such as car manuals and travel guides." But surely nil-use books aren't doomed to languish in Boston Spa's book mausoleum for ever. "Of course not. What's nil use one year may not be in following years. It's a very flexible system."

The British Library isn't the only one of our great libraries building new warehouses on an industrial estate in the face of unprecedented supply-side problems. In September, the University of Oxford was given planning permission to build a £29m book depository for the Bodleian, Britain's second largest library. Objectors claimed that the site at Osney Mead would be subject to flooding and that the thumping great building would spoil views of the city's dreaming spires. But Sarah Thomas, the Bodleian's head librarian, argues that the new building gives her library the chance to house all its modern collections in a secure, modern depository, rather than continue struggling in their current buildings.

"We are simply getting to the point where we cannot fulfill the purpose for which we were created in these buildings," Thomas says. By "these buildings", she means some of Oxford's most beautiful examples of architecture, that, from the Bodleian's inception in 1602, have housed the second greatest collection of books in Britain. Buildings such as the Old Schools Quadrangle, the Radcliffe Camera (Britain's first circular library), Hawksmoor's lovely 18th-century Clarendon Building, as well as nine other libraries dotted around the city.

She also means Giles Gilbert Scott's New Bodleian Library, across Broad Street from the library's loveliest old buildings, which was supposed to satisfy the library's need for expansion for ever. That need has arisen again and again since the Bodleian was founded in 1602, and particular since 1610 when Thomas Bodley made his historic agreement with the Stationers' Company in London (a guild given a monopoly over printing in England in the 16th century) to place a copy of every book registered with them in his new library. This agreement was the precursor of today's legal deposit system (as the copyright system is more accurately called). When the New Bodleian opened, it was at the cutting edge of library design. Scott's ziggurat consisted of 11 storeys of books stacks, three of them underground. A tunnel under Broad Street connected new and old buildings with a pedestrian walkway and a mechanical book conveyor known as "the bicycle chain". But the New Bodleian is now regarded as a fire hazard and a conservation nightmare. One report described it as "130% full". Hundreds of thousands of less frequently used books are stored in Wiltshire, and in a salt mine in Cheshire.

"This is one of the greatest libraries in the world, but we can't just operate as a books warehouse, we must be a national and international centre for the study of the books," says Sarah Thomas. She wants the New Bodleian to be gutted (once they've got the books out first, of course) and then used as a centre for scholars and as a conservation studio. As a library, it is finished.

"With all due respect," says Peter Fox, librarian of Cambridge University Library, "in hindsight it's clear the Bodleian made a terrible mistake before the war when it built the New Bodleian in the city centre. At that time, both Oxford and Cambridge desperately needed to expand, but Cambridge couldn't expand in the city centre, so we built a new university library outside it. It turns out we were lucky." The location of Scott's new building meant that the University Library could expand - and indeed has been expanding - to house more and more. On his desk, he has a model of the development of the University Library, phased wings dropping neatly into place over time as the need dictates.

We're standing on the 14th floor of Giles Gilbert Scott's university library tower, which teems with low-use, probably utterly forgotten but rather lovely first editions of 20s novels I've never heard of. I pull out at random a copy of Harold Bindloss's Sour Grapes, a 1926 romantic adventure set, singularly, in Manitoba and along the Solway Firth. I put it back, and pull out instead Patsy's Brother, by Harriette R Campbell, the sequel, as you know, to the Little Great Girl, which was published in the Books For Girls series in the same year. It looks like a delightful girly romp: if only I had been an eight-year-old girl in 1926. It may be the first time in 80 years that these volumes have received such close attention.

Fox then takes me to the latest extension of the library where we find new paperback books housed in rather beautiful stacks, all moving easily on manually-operated tracks. We remove a box, designed to repel acid (paperback books need to be kept this way if their shelf life is to consist of more than a few years). Inside, we find not only a marvellous new book about the Port of Ayr, but also a book called Momentum In Football, featuring a foreword by Sven-Göran Eriksson. Wouldn't it be great if you could just sell this stuff on eBay or recycle it sensibly? Wouldn't it be wonderful if you could digitise such books and pulp the hard copy? Think of all the shelf space you'd save.

"Trust me, it isn't as simple as that," Peter Fox replies.

I visit the British Library's digitisation studio in St Pancras to be disabused of my barmy idea that transferring books and journals into cyberspace would be a cheap and painless solution to the problem of where to store the ever-growing mountains of printed material. There, the British Library is working with Microsoft on a project to digitise 25 million pages of 19th-century literature - 100,000 books from the Library's collections. It is a semi-automated process during which 1,000 to 1,200 pages can be scanned an hour, 50,000 a day, or one million a month. Why were 19th-century books chosen for the British Library-Microsoft project? "One key reason is copyright," says Neil Fitzgerald, digitisation project manager. "Nineteenth-century material is generally outside copyright restrictions. The publishers of more recent books may well think there is money to be made by digitising certain books themselves and publishing them, rather than allowing us to put books free online."

That said, more and more of the British Library's collections are available on the internet. Rare historic manuscripts such as William Caxton's two editions of Chaucer's Canterbury Tales can be consulted online if you go to bl.uk and follow the links. Soon Sir Thomas Malory's stories about King Arthur, known as the Winchester Manuscript, later printed by William Caxton as Le Morte D'Arthur, will be available online, too.

The money for such projects tends to come from private investors. For instance, Google and the University of Oxford recently came to an agreement to digitise one million of the Bodleian's books printed before 1885, and to make them freely available online through Google and the OU's websites. Google has similar agreements with Harvard University, Stanford University, Michigan University and the New York Public Library. One can search these digitised texts for keywords online. "These developments are quite exciting in terms of access," says Rory McLeod, digital preservation manager at the British Library. "Originally our collections were for the cognoscenti who could make it to Bloomsbury. Now, increasingly, they're for everybody, wherever they are in the world."

But, as we sit in the British Library cafe in the shadow of the beautiful King's Library (the collection of George III's books), McLeod nearly gags on his americano when I suggest he should digitise everything and, apart from some particularly lovely manuscripts and books, make a huge bonfire of the rest of the stuff, or at least of every autobiography by a footballer under 30. "It's been estimated that €3bn are lost across Europe entirely due to bad management of digital files in libraries," he says and then asks challengingly: "Would we have enough confidence to throw everything away? Would you?"

The other question is whether legal deposit libraries are sustainable in an era when, one might think, unprecedented levels of trash are published and cash-strapped organisations such as the British Library are responsible for the costs of housing them. "I think the legal deposit system is a good one, and we should keep with it," Rory McLeod says. "After all, what is trash today could become fundamental for tomorrow's historians. Even Katie Price's novels or ephemeral stocking fillers could become essential raw material for understanding our society."