RPM Installation & Removal issue

Hi,

I created an RPM for one of our internal serer: tel-gw--2010.05.1.0-SNAPSHOT-1.rpm

What happened I Installed for 5 times, and it get installed (/usr/tel-gw/) & added 5 entries into rpm db. And when I query RPM db as "

rpm -qa | grep tel-gw--2010.05.1.0-SNAPSHOT-1

", it shows 5 times in listing:

#rpm -qa | grep tel-gw--2010.05.1.0-SNAPSHOT-1
tel-gw--2010.05.1.0-SNAPSHOT-1
tel-gw--2010.05.1.0-SNAPSHOT-1
tel-gw--2010.05.1.0-SNAPSHOT-1
tel-gw--2010.05.1.0-SNAPSHOT-1
tel-gw--2010.05.1.0-SNAPSHOT-1
#

I tried to remove using:
1.

rpm -e tel-gw--2010.05.1.0-SNAPSHOT-1
rpm -e tel-gw

but wont get succerpm -e tel-gweded to remove.

Also, I tried :

rpm -e tel-gw --allmatches

and

rpm -qa | grep tel-gw | xargs rpm -e

, but again not succeeded.

P.S
When I tried using,

rpm -qa | grep tel-gw | xargs rpm -e

, it gives an error:

error: package tel-gw--2010.05.1.0-SNAPSHOT-1 is not installed.

But later, if I fire "

rpm -qa | grep tel-gw--2010.05.1.0-SNAPSHOT-1

", it shows the same 5 entries as earlier.

Please help how to remove.

---------- Post updated at 09:19 AM ---------- Previous update was at 04:43 AM ----------

Hey everybody .... I fix that .... by writing ....

rpm -e  --allmatches --noscripts --repackage tel-gw-

Just forgot to mention earlier, that my package name was 'tel-gw-'.
So, what I did, I created the RPM package again (tel-gw-) and fire the above command.