# How to purge&remove forcebly all files a.out & all files with .o in all (sub)directories in a git repo.



## Alain De Vos (Jun 2, 2022)

There is a file .gitignore but i want to also delete all history from these files...


----------



## obsigna (Jun 3, 2022)

In case these files made it somehow into version control, I would execute in a working directory of the repo:
`find . -name "a.out" -or -name "*.o" -print0 | xargs -0 git rm`

Perhaps you want to do a dry run before, in this case add the directive --dry-run at the end of above command.

Afterwards you execute:
`git commit -am "removed all a.out and *.o files from the repo."`
`git push`

In case these files are not under version control, I would execute:
`find . -name "a.out" -or -name "*.o" -print0 | xargs -0 rm -v`


----------

