I use TeX a lot and it generates lots of auxiliary files that I am generally not interested in opening, and they clutter up my folders. Is there any way to make Finder automatically hide/gray-out files with certain extensions in Compact List or Column views, either for a specific folder or for all folders?
Alternatively, if this is not possible, can I customize the "view by file type" option to separate into my own categories based on file extension (e.g., category 1 would contain .tex and .pdf files, category 2 would contain .sty and .bib, and so on) and have them listed alphabetized by category?
Best Answer
One option would entail examining latexmk and rubber with their cleanup options.
But since cleaning up the .aux and related files is only recommended after the final compilation run anyway, the following seems to present a very neat solution for macOS users. One way to cleanup afterwards when you use TeXShop with its default settings is adding this flexible AppleScript to the program:
[quote] A TeXShop solution
As others have mentioned, deleting auxiliary files as a matter of course is not usually a good idea, especially for complex documents. However, it is useful to be able to delete them manually when needed.
I use the following Applescript (written by Claus Gerhardt) saved as a macro in TeXShop. The script could also be adapted to other Mac editors. What I like about this script is that I can add new aux file extensions when needed, and it is able to deal with multiple part aux extensions such as -blx.bib, etc.
[/endquote]
copied from here (also take a look at the other suggestions)