This really is the best way to keep these types of things. I currently have one jar for each; nails, screws, tacks, batteries, cup hooks, picture hooks, and headless tack nails (for woodworking).
I threw away a lot though. Old tiny bits of used sand paper, paper plans, bolts from beds we haven't had for years, etc. It all went. The garage tool box lowest section was dedicated to all the things we definitely will need, but don't need very often. Things like dry wall patch, wood putty and the putty knife, touch up paint for the car, packages of wool pads for the bottoms of chair legs, the knife sharpener... stuff like that.
I went from a whole cabinet to a milk crate and my two tool boxes. It feels pretty darned good... Even if I could have done it less meticulously.