Try the following. \w*matches the last word inside the file, and $binds the search to the end of the line.
sed s/'\w*$'// old.txt > new.txt
The reason old.txt is output as new.txt is probably because your regular expression ^*\ndoes not match the lines in old.txt.
source
share