I removed dnsmasq-base with
sudo apt-get remove dnsmasq-base
then I tried to install
sudo apt-get install dnsmasq
After executing the first command network manager is disabled and I am not more connected to any network, so the second command execution failed due to network error.
Now I am wondering how to connect to any network , since network manager is disabled, I am not able to connect to any network.