How to do a clean installation of a software in Mac I bought a software as a dmg file. It came with a license which was expired on 31st October 2018 
So, I bought a newer version of that of that software with a license for the next 12 months. 

When I installed that new software and open it. It says that your license is expired. 
When I clicked on the license tab. It shows the expiry date which is 31st October 2018 

I wanted to know how I can completely remove that software from my system so, that I can re-install the newer version of it and get the upgraded license. 

Note: I know how to do it in a Windows machine by removing the registry of that software or using 3rd party software such as uninstaller pro.
There is no registry on macOS so the developer can choose from many ways to license the software. Some store files and licenses in your user keychain, others in your user library. If the software is licensed per computer (say three people have user accounts on your mac but all can use the software) then the license key would be stored in the system area.

I would start with the vendor to get the uninstall / unlicense steps needed for however they choose to implement their licensing scheme. It could be a preference that is cryptographically signed or something as trivial as writing a hidden (or obscurely located) file on the filesystem.

Things like this are why App Store and buying apps through Apple is so compelling - all this confusion on licensing is cut through with a simple to understand model. Unfortunately - many vendors still try the old ways or think they can save money by not supporting their customers. This vendor is doubly unfair since the new install should clean up after the old if the old uninstall process left behind detritus or they don't have a clear path to get support.

I'm glad to see they did support you and resolve this issue. Feel free to add an answer if you learned where this vendor stores their licenses or if it was just re-running their license tool that fixed it.