Try ERPNext Buy Support Partners Foundation

How to Remove Attachment on Side Pane using Js

Add this code to the refresh event or any other function.

$(".add-attachment").empty()