If you run out of space, you can "Archive" Terraria. This deletes the game data and update NSPs but safely preserves your character and world save data. You can redownload the game and its latest update anytime from the eShop.
To get the update, simply follow these steps: terraria switch nsp update