The triple clean sweep in all 3 formats of cricket has been recorded once before, when Pakistan visited Australia in 2009-10. Australia won the Tests 3-0, the ODIs 5-0 and the single T20I (admittedly by only 2 runs). You can see the details here:
http://www.espncricinfo.com/ci/engine/series/index.html?season=2009%2F10;view=season
The second Test was won by the comparatively narrow margin of 36 runs.
Then came the ODIs:
http://www.espncricinfo.com/ci/engine/series/index.html?season=2009%2F10;view=season
The first 4 ODIs were rather one-sided although Australia won the 5th one by 2 wickets.
And finally:
http://www.espncricinfo.com/ci/engine/series/index.html?season=2009%2F10;view=season
Australia won this by just 2 runs, making it a 9-0 sweep. Remember that this was in their home country.
Nothing like this was achieved until India visited Sri Lanka in 2017:
Tests 3-0 with Sri Lanka losing by big margins:
http://www.espncricinfo.com/ci/engine/series/index.html?season=2017;view=season
ODIs 5-0, all by handsome margins except one win by 3 wickets:
http://www.espncricinfo.com/ci/engine/series/index.html?season=2017;view=season
And the T20I by a good margin:
http://www.espncricinfo.com/ci/engine/series/index.html?season=2017;view=season
Thus India emulated Australia’s 9-0 triple clean sweep, with somewhat bigger margins of victory. But unlike Australia, they achieved this away from home.
Salute Virat Kohli and his men.
Kohli captained all 9 matches, but faced a bewildering array of captains:
Tests: Herath, Chandimal, Chandimal
ODIs: Tharanga, Tharanga, Kapugedara, Malinga, Tharanga
T20I: Tharanga
In contrast, the Australian captain Ponting faced M. Yousuf in the three Tests and 4 of the 5 ODIs, when Afridi came in for the last one. In the T20I it was Clarke vs Shoaib Malik.
Tail piece:
Earlier, India won a T20I series 3-0 in Australia in early 2016 which was believed to be the only clean sweep by a visiting team in Australia in any format of cricket in a series of at least 3 matches: