I'm a newbie in Netapp and I would like to know how to reset aggr0 to factory settings without losing all the configurations I've already made.
If you are talking about resizing: You can add disks and increase an aggregate's size but you can't shrink an aggregate.
To achieve this, I think you would have to determine just what data and configs need saved out of aggr0, copy them elsewhere or back them up, and then bite the bullet and do an ONTAP reload and build the aggregate at the size you want during the setup.
Once you're up and running again, you can copy back the configs and data you saved elsewhere.
What configurations do you want to save? Resetting to factory settings implies you want to get rid of all your own configurations.