I had the same trouble. That was a nightmare.
Finally I got through with this command :
https://domainURL/civicrm/admin/extensions?action=disable&id=org.civicrm.volunteer&key=org.civicrm.volunteer
But still there is several tables that need to be remove manually in the SQL database :
civicrm_value_civivolunteer_2
civicrm_value_volunteer_com_4
civicrm_value_volunteer_inf_3
civicrm_volunteer_need
civicrm_volunteer_project
civicrm_volunteer_project_contact
but after reinstall there is an error :
CiviCRM_API3_Exception: "Field:
namemust be unique. An conflicting entity already exists - id: 108"
So I remove manually from civicrm_custom_group and civicrm_custom_field for everything with volunteer :
DELETE FROM civicrm_custom_group
WHERE civicrm_custom_group
.id
= 2;
DELETE FROM civicrm_custom_field
WHERE civicrm_custom_field
.id
= 2;
But still when reinstall the extension I still have an error.
CiviCRM_API3_Exception: "Field: name
must be unique. An conflicting
entity already exists - id: 108"
Then I found this
https://github.com/civicrm/org.civicrm.volunteer/blob/master/sql/volunteer_uninstall.sql
But no luck still. Error.
So I give up. I will not use this extension that leave too much legacy.
I remove it from the ext folder to avoid installing again.
////// EDIT //////
Finally, as there there were no way to avoid countless errors indicating Volunteer. I decided to try reinstall it rather than suppress it.
That wasn't possible. So I compare a fresh install of CiviCRM with Volunteer.
First I copy these tables (all are empty) via phpmyadmin, or in one case I changed the name to match :
Then I enter the SQL line :
INSERT INTO civicrm_extension
( type
, full_name
, name
, label
, file
, schema_version
, is_active
) VALUES
( 'module', 'org.civicrm.volunteer', 'CiviVolunteer', 'CiviVolunteer', 'volunteer', NULL , 1);
Then Volunteer worked. Happy !