I'm not convinced that you have to replace the sand with new, but it's certainly the easier route. If you just want to clean the old sand you can. Rinse in small batches using 5g buckets, about half full with sand and your garden hose. Rinse and agitate with your hand (heavy gloves recommended) until the water runs clear. Then all the rinsed sand can get a 24hr vinegar bath - stirring occasionally. You'll see bubbles, which is good. Rinse well again - more cloudiness should rinse out. If you like how it looks, call it good. If you want it even cleaner looking, add a bit of bleach for another 24hr soak. New sand is starting to look attractive now isn't it? Even with new sand though you want to give it that same first rinsing until no cloudiness.
Same with the rock - blast off anything loose with the hose. Vinegar & water bath with circulation (maybe 5:1 water:vinegar) 24hrs, blast off the rocks again and inspect, repeat if you feel the need. Next steps are kind of up to your time constraints, but I like to give the rocks a nice long soak in RO water with circulation, a few days at least, change the RO water and go a few more days. Then start 'curing' in heated salt water. Testing for ammonia, nitrite, nitrate, phosphate. Should see a cycle happen. Do water changes.
I had the time to kill while everything else was being built/setup, so I went well over a month in the tub this way, covered for insulation, reduced evaporation and no light.
Garden totes are very handy for all this.