In all truthfulness, the fact that you buy coffee grounds instead of whole coffee beans is the biggest culprit.
Here's a list of things to consider:
- By whole beans
- Grind immediately before use, not the night before, not an hour before, but immediately before brewing.
- Keep in air tight container, and store in a dark place. Do not put them in the freezer, as they are subject to freezer burn, and long exposure to cool temperatures can effect the flavor.
- By from a roaster. Roasters roast daily, and you'll likely get a batch that's no older than 2-3 days, often times you'll get beans roasted that day or the day before.
You can see how fresh your beans are when you initially add hot water to the grounds. Fresh beans will produce lots of foam, as they still have lots of CO2 left in them from the roasting process.
Some things to note when grinding beans at home are the type of grinder you use. Blade grinders will not provide a consistent grind, the grounds will be a varying sizes, and this affects extraction more than you'd think. For the record, no coffeeshop(not even the dinner down the street) use a blade grinder. Make sure to have a Burr Grinder, or a Hand Mill grinder. These will provide you with a consistent grind.
A few burr grinders that I've known to work well:
- Hario Ceramic Coffee Mill Skerton
- The first burr grinder that I owned. I used to brew single cups and didn't want to spend the $100+ to get an automatic burr grinder. It works really well, but I got sick of grinding coffee by hand every morning for 2 years.
- Capresso Infinity Conical Burr Grinder
- Pretty standard automatic burr grinder. Its in the lower price range, but it works well.
- Baratza Encore
- This one gets lots of hype in the coffee community, mostly because its relatively cheap, and it has a wide range of grind settings.
- Baratza Virtuoso
- A set up from the Encore model.
It depends on what you're willing to spend for a grinder. If you really want to get into coffee I'd start with the Baratza Encore. If you just want a automatic grinder the Capresso Infinity might be for you. If all the other options are too expensive the Hario Coffee Mill works great.