As we discussed, I found that once I delete the pipeline and again create the pipeline with same name, then this new pipeline brings back the history of old pipeline that had the same name.
Upon further investigation, I learnt that in GoCD, even if I delete the pipeline it left some residual in the GoCD database that's why when someone creates the pipeline with same name again it brings back the history.
Can you please explore on this and share your thoughts with us on this issue whether this is a bug in gocd or this can be handled.