For me the only way to get rid of old gulp-CLI on Mac OS 11.7.4 was to remove the following folder:
rm /usr/local/lib/node_modules/gulp/node_modules/gulp-cli
I wanted to upgrade gulp from 4.0.3 -> 5.0.0 and got "Unsupported gulp version" error because of gulp-CLI 2.3.0. I managed to upgrade gulp-CLI globally with command:
/usr/local/lib/node_modules/gulp/ sudo npm i gulp-cli@latest
as my global(?) gulp points there
/usr/local/bin/gulp -> ../lib/node_modules/gulp/bin/gulp.js