Thanks it worked to some extent. I’ve run
cd /var/discourse/shared/
/var/discourse/launcher enter app
rails c
In the terminal and then executed the code
uid = User.find_by(username: "user_name").id
user_avatars = UserAvatar.where(user_id: uid)
user_avatar = user_avatars[0]
upload_url = Upload.find(user_avatar.custom_upload_id).url
to list all avatar URLs and deleted them from my server.
But I guess I still need to further refresh the system/cache? How should I do this?