how to delete lines from a file which starts with a specific pattern

I need to delete those lines from a file, which starts with 45.
How to do it?

thru sed..

sed '/^45/d' inputfile > outfile
 # delete lines matching pattern
 sed '/pattern/d'

in your case

sed -i '/^45/d' infile > outfile
grep -v '^45' infile > outfile

or:

awk '!/^45/'  infile > outfile