To uninstall tree just follow these instructions.
Are you having problems? You can always add treeagain by following the instructions at this link.
This will remove just the tree package itself.
This will remove the tree package and any other dependant packages which are no longer needed.
If you also want to delete your local/config files for tree then this will work.