Dried pasta must be stored in a cool, dry place such as a pantry or a drawer. If properly sealed, it can last up to two years! If you live in a city with a very humid And hot climate, store your pasta in a vacuum bag or in a sealable box to keep moisture out.
What if the package has been opened?
You can safely leave it there even for a couple of weeks. In your pantry, it can stay as long as you close the bag with a rubber band or pliers. Tip: always try to finish first the package that you have been storing for the longest time in your pantry, so that you will always be sure that the pasta in your pantry is always fresh.