I don't think checking the size of the library like that is very useful, and trying to save a few Kb here and there is probably rather futile. You are likely to be a lot better off concluding that the leonardo is simply not up to the job you want to do, and coming forth with the $15 to buy a Mega, which is. You won't be the first to realise the mistake and, if you make any further improvements to your project, it will become more obvious that fixing the mistake at this point in time was a good idea.
If that is too hard to swallow, it might be simpler to revise the job. What you are communicating, and why, is not clear. If it is just data for local consumption, do you need Ethernet to do that?
when i use SD card library my flash memory runs short.
The SD card library is 11612 bytes i size which is almost 40% of the flash memory.
My project, i read configuration variables from sd card, read data from sensors and then send it via ethernet to a server.