Remove Travis CI old builds

gremo picture gremo · Dec 14, 2012 · Viewed 13.5k times · Source

This is my first day using Travis CI. I made some mistakes, I've tried removing and adding the repository again, but Travis CI build history is still there, with broken links for old commits.

Any chance to remove those old builds?

Answer

Archimedes Trajano picture Archimedes Trajano · Dec 22, 2016

You can use the travis command line tool

Login first using travis login then you can do the following

LAST_BUILD_NUMBER=68
for i in $(seq 1 $LAST_BUILD_NUMBER ); do  travis logs $i --delete --force ; done

This will remove the "logs" so there's no information aside from the header and any confidential information will no longer be visible.