This command will show all non-directories in /:
find / -maxdepth 1 -type f
Once you have made absolutely sure no files are there that you wish to keep, you can use:
find / -maxdepth 1 -type f -delete
Safer, would be to move them elsewhere to ensure you aren't deleting something you want to preserve:
mkdir /root/preserve
find / -maxdepth 1 -type f -exec mv -- "{}" /root/preserve/\;
If, in addition to files, you also have directories that you've added to the root of the filesystem, this could be automated by excluding the LSB directories from an automated mv or rm, but honestly, since we're dealing with purging things in the root of the filesystem, I would strongly suggest you consider doing it manually if at all feasible.
If this is not feasible, something like this could do the trick:
#!/bin/bash
declare -a excludes
for item in root sys 'lost+found' mnt home proc etc opt boot lib lib64 libx32 sbin media srv dev var usr bin tmp run; do
excludes+=("$item")
done
if ! [[ -d /root/preserve ]]; then
mkdir -p /root/preserve
fi
IFS="\n"
for item in find / -type d -maxdepth 1; do
really=true
for exclude in ${excludes[@]}; do
if [[ "$exclude" == "${item#/}" ]]; then
really=false
fi
done
if [[ "true" == "$really" ]]; then
mv -- "$item" /root/preserve/
fi
done
Once you've passed the scream test (i. e. your system still runs and you are not screaming in anguish), you can remove the contents of /root/preserve/.
Important note: Whatever you do, don't even think about running any permutation of rm -fr [ANYTHING GOES HERE] /.