Packing or sealing products in an airless environment has long been an effective way to protect items and enhance shelf life. But most importantly vacuum sealing keeps good fresh.
So yes, vacuum sealing coffee is the best way to keep it fresh, but it must be in the right bag. The right bags are not simple poly bags; you must use vacuum bags.
Good quality vacuum bags are sealed on 3 sides and have multiple layers and satisfactory thickness to provide the maximum barrier to oxygen. It is this barrier to oxygen which will ultimately preserve the coffee and keep it fresh for longer. In addition, foil pouches or foil coated vacuum bags also keep the light out which goes further to protect the freshness of the coffee beans.