I figured out a possible small confusion in my question regarding "not using submodules": are there unused submodule folders left, or were those folders deleted already and only cache is left?
Well, I think we can address both situations by first following a clean removal process, and then assume something was not done correctly and perform a manual cleanup.
The necessary steps for deleting one submodule are explained in How do I remove a submodule?. But to answer the question we will remove all submodules at once without assuming we know the names of the submodules.
# deinit all submodules from .gitmodules
git submodule deinit .
# remove all submodules (`git rm`) from .gitmodules
git submodule | cut -c43- | while read -r line; do (git rm "$line"); done
# delete all submodule sections from .git/config (`git config --local --remove-section`) by fetching those from .git/config
git config --local -l | grep submodule | sed -e 's/^\(submodule\.[^.]*\)\(.*\)/\1/g' | while read -r line; do (git config --local --remove-section "$line"); done
# manually remove leftovers
rm .gitmodules
rm -rf .git/modules
I do not know for server synchronisation. It could be done automatically with next commit, or we might need those commands:
git submodule sync
git submodule update --init --recursive --remote