A script to remove unneeded files
Move your code inside a function rather than doing things at module level to make it re-useable. Your function could accept a list of paths either through a function call or through command line arguments instead of a global list of paths.
Keep standard library, third party imports separate.
You could use itertools.chain.from_iterable instead of your flatten function. Also use glob.iglob to get an iterator instead of list of files to save memory.

for path in chain.from_iterable(glob.iglob(path) for path in PATHS):
    ...

For comparing types use isinstance instead of comparing types using is. is won't work in case of multiple-inheritance. Read: Differences between isinstance() and type() in python