First, the original sentence doesn't quite sound natural because the act of keeping isn't equivalent to "waste space". However, you could say
To keep 2 copies of the file would waste space.
To keep 2 copies of the file would be to waste space.
To keep 2 copies of the file would be a waste of space.
To keep 2 copies of the file would result in wasted space.
Second, if the second version isn't a copy of the first, then the reasoning no longer holds; you're not deleting the old version because it's a copy but because it isn't needed for another reason. In this case, you might say, for example,
To keep an obsolete version of the file wastes space.
It's a waste of space to keep an old version of the file.
It wastes space to keep an out-of-date file.
Space is wasted by keeping multiple versions of a file.