Feta can keep nearly indefinitely if sealed and in brine. Once it is opened, it can still keep in the brine for a year or so. Many packages include a recipe to create additional brine to keep the cheese covered if need be.