I can retrieve the softwares using the dpkg command but is there a command to get the associated category for the software . For example if I have Firefox installed can I somehow retrieve a tag for it that says browser or may be a more abstract term say internet tools.
You can use
For firefox it will simply return
Of course you can also use the same command without a package name:
To get the categories as shown in the Software Center you need to parse files in /usr/share/applications like this:
To get only the most specific applicable category, you could try this: