| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Clean all traces of PostgreSQL data/configuration from the current system. |
| 4 |
# Use with caution, for development/testing only! (This is not installed into |
| 5 |
# packages.) |
| 6 |
# |
| 7 |
# (C) 2008-2009 Martin Pitt <[email protected]> |
| 8 |
# (C) 2018 Christoph Berg <[email protected]> |
| 9 |
# |
| 10 |
# This program is free software; you can redistribute it and/or modify |
| 11 |
# it under the terms of the GNU General Public License as published by |
| 12 |
# the Free Software Foundation; either version 2 of the License, or |
| 13 |
# (at your option) any later version. |
| 14 |
# |
| 15 |
# This program is distributed in the hope that it will be useful, |
| 16 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
# GNU General Public License for more details. |
| 19 |
|
| 20 |
set -ux |
| 21 |
|
| 22 |
/etc/init.d/postgresql stop |
| 23 |
killall postgres |
| 24 |
rm -rf /etc/postgresql/* /var/lib/postgresql/* /var/log/postgresql/* /tmp/postgresql-testsuite/ /var/run/postgresql/* |