find -type f -name '*.txt' -exec rm -rf {} \;

repeat for other extensions