Thanks Baris. I tracked down the particular command that is causing troubles: The glob that is looking for pictures and covers to delete from the /assets/uploads/profile directory takes too long.
A quick fix will be to delete only user's cover:url (if it's a file not url) and uploadedpicture from the directory. But it won't work in general when keepAllUserImages is true. The best fix would be to store all paths to user covers and pictures and then delete them all without needing to use glob.
What do you think?