If they are already inside vacuum sealed bags/jars, put them in freezer; otherwise, vacuum seal them (food saver), then freezer. The key is to isolate them from oxygen and low temperature.
Someone told me NEVER store roasted coffee beans in a refrigerator. NEVER store coffee beans in a Freezer. Never buy ground coffee beans and never grind coffee beans until you are ready to use them.