Code
import os
pathtocheck = 'path_of_folder_to_check'
for (dirpath, dirnames, filenames) in os.walk(pathtocheck):
for filename in filenames:
path = os.path.join(dirpath, filename)
if os.path.getsize(path) <= 5:
print(f'removed {path}')
os.remove(path)