After importing our contacts into HubSpot, we realized that we had a number of created companies that no longer existed. Finding them manually in 2000 total companies tedious. Also, we could not rely on the lack of a company icon to identify these as not all companies receive a logo on import.
In talking with our onboarding specialist we realized that a quick Bash script would do the work.
Here is the process:
1. Go to HubSpot Companies and export all companies to a Excel file (XLSX).
2. Open the file and delete all columns except for the "Company domain"
3. Save it to a new domains.csv file via "Save as..."
4. (required on Mac/Linux) Open the file with an editor and change all CRLF line endings to LF
5. Run the following script: "./dead-companies.sh"