Any version of opscode-reporting prior to and including 1.6.5 (12/20/2016) does not uninstall properly so please use the following instructions when uninstalling opscode-reporting and its Postgres database.
Be sure to use the root user to run all of the following commands.
It is important to first remove the reporting API endpoint so Chef Client runs will no longer use it. If you do not do this before uninstalling reporting, the Chef Client runs will fail. Run the following set of three commands on each frontend. The last command may fail if the database has already been deleted.
rm /var/opt/opscode/nginx/etc/addon.d/*-reporting_*.conf chef-server-ctl hup nginx
Stop the opscode-reporting service:
chef-server-ctl stop opscode-reporting
Delete opscode-reporting's Postgres database and Postgres roles, and delete its data files, log files and configuration files:
opscode-reporting-ctl cleanse --with-external
If --with-external isn't available or doesn't delete the database for some reason, try the following on the Chef Server that is running Postgres after running opscode-reporting-ctl cleanse
echo "DROP DATABASE opscode_reporting;" | su -l opscode-pgsql -c 'psql'
echo "DROP ROLE opscode_reporting;" | su -l opscode-pgsql -c 'psql'
echo "DROP ROLE opscode_reporting_ro;" | su -l opscode-pgsql -c 'psql'
Uninstall the package:
rpm -e opscode-reporting
dpkg --purge opscode-reporting
Delete any remaining files:
rm -rf /opt/opscode-reporting