I Create some file in %post script of rpm as follow

--spec file version 1.1 --

```
%post
  echo %{version} `date` > /var/info

```

Above script is not present old rpm (i.e version <= 1.0). /var/info file is created when new (version 1.1) rpm is installed

I downgrade package as follow

```
rpm -Uvh --oldpackage myrpm-1.0.rpm

```

I want remove /var/info file when downgrade rpm.

if I include following script as follow then it remove file on uninstall but not upgrade.
--- spec file---

```
 %postun
    if [ $1 =="0" ]
       rm /var/info
    fi

```

Can you please help me to remove file if I downgrade to version < 1.1