I believe you can fit 11 books per shelf. Tall bookshelves have a capacity of 33 books (3 shelves). I believe this is possible to accomplish.
Actually I think the tall bookshelves are 4 shelves high. I believe the total capacity of one house library is around 500 books. The big problem will determining if you have duplicates in your collection, as you can only examine one shelf at a time.
If your "all" is not just distinct titles, then you won't manage it, as re-spawning containers will keep making more, and random instances will always be out there uncollected.
Edit: the only figure I found is 308 books in the library tower, but there are additional bookshelves in other rooms, such as the main hall. There are 470 unique books, without mods.
I don't think one library can hold one of every book. I think I have mine filled up already and that's not including journals and notes. I've had to put books in other places.
If you are on pc you can use http://www.nexusmods.com/skyrim/mods/52583/? to either duplicate book shelves or de-clutter the shelves their and put books on those. If on console, you can arrange book's on shelves and/ or stack them in corners. You have to drop the books, exit the house, go back in and position them, then save, exit again and go back and see if they are in the same spot. It is a pain but can be done.