Completely uninstall PostgreSQL 9.0.4 from Mac OSX Lion?
这个问题看起来像是:如何在我的Mac(运行雪豹)上卸载PostgreSQL,但是有两个主要的区别。我正在运行lion,我正在尝试卸载PostgreSQL 9.0.4。我看了最后一个问题和它引用的链接,但在运行此命令时没有找到名为"uninstall postgresql"的文件:
1 | sudo find / -name"*uninstall-*" |
所以,我假设这意味着9.0.4的卸载过程与8.x的卸载过程不同。
我在不同的地方看到过一些文章,描述了一种手动卸载的方法,但同样地,一些引用的目录/文件在我的机器上不存在。
如果您能提供任何帮助或指导,我们将不胜感激。
仅供参考,这是另一个海报用于从雪豹卸载Postgres的链接。当我试图单步执行这些命令时,大多数命令都被一些"找不到命令"的变体阻塞了。
更新:
除了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | > sudo find / -name"*postgres*" find: /dev/fd/3: NOT a directory find: /dev/fd/4: NOT a directory /Library/Ruby/Gems/1.8/doc/activerecord-3.1.1/rdoc/lib/active_record/connection_adapters/postgresql_adapter_rb.html /Library/Ruby/Gems/1.8/doc/activerecord-3.1.1/ri/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/postgresql_version-i.ri /Library/Ruby/Gems/1.8/doc/arel-2.2.1/rdoc/lib/arel/visitors/postgresql_rb.html /Library/Ruby/Gems/1.8/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb /Library/Ruby/Gems/1.8/gems/arel-2.2.1/lib/arel/visitors/postgresql.rb /Library/Ruby/Gems/1.8/gems/arel-2.2.1/test/visitors/test_postgres.rb /Library/Ruby/Gems/1.8/gems/railties-3.1.1/lib/rails/generators/rails/app/templates/config/DATABASES/jdbcpostgresql.yml /Library/Ruby/Gems/1.8/gems/railties-3.1.1/lib/rails/generators/rails/app/templates/config/DATABASES/postgresql.yml /Library/WebServer/Documents/postgresql /Library/WebServer/Documents/postgresql/html/app-postgres.html /Library/WebServer/Documents/postgresql/html/postgres-USER.html /private/etc/apache2/users/postgres.conf /private/var/db/dslocal/nodes/DEFAULT/groups/_postgres.plist /private/var/db/dslocal/nodes/DEFAULT/sharepoints/postgres's Public Folder.plist /private/var/db/dslocal/nodes/Default/users/_postgres.plist /private/var/db/dslocal/nodes/Default/users/postgres.plist /System/Library/DirectoryServices/DefaultLocalDB/Default/groups/_postgres.plist /System/Library/DirectoryServices/DefaultLocalDB/Default/users/_postgres.plist /Users/postgres /Users/remcat/dev/working/startwire/vendor/plugins/foreign_keys/lib/foreign_keys/postgresql_adapter.rb /Users/remcat/Library/Application Support/CrashReporter/postgres_DCCEF98F-4602-5FF7-964F-5E717AC007B4.plist /Users/remcat/Library/Caches/Homebrew/postgresql-9.0.4.tar.bz2 /Users/remcat/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fstatic%2Findex.html.webhistory /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194716_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194742_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194757_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-194958_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-203352_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/CrashReporter/postgres_2011-11-06-203359_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194716_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194742_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194757_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-194958_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-203352_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/.postgres_2011-11-06-203359_Ramys-MacBook-Pro.crash.plist /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194716_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194742_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194757_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-194958_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-203352_Ramys-MacBook-Pro.crash /Users/remcat/Library/Logs/DiagnosticReports/postgres_2011-11-06-203359_Ramys-MacBook-Pro.crash /Users/remcat/Library/Saved Application State/org.postgresql.pgadmin.savedState /usr/bin/postgres_real /usr/include/postgres_ext.h /usr/include/postgresql /usr/include/postgresql/internal/postgres_fe.h /usr/include/postgresql/server/postgres.h /usr/include/postgresql/server/postgres_ext.h /usr/include/postgresql/server/postgres_fe.h /usr/lib/postgresql /usr/local/Library/Aliases/postgres /usr/local/Library/Formula/postgresql.rb /usr/local/var/postgres /usr/local/var/postgres/postgresql.conf /usr/share/devicemgr/backend/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb /usr/share/devicemgr/backend/vendor/rails/railties/configs/databases/postgresql.yml /usr/share/devicemgr/webserver/gems/gems/eventmachine-0.12.10/lib/em/protocols/postgres3.rb /usr/share/man/man1/postgres.1.gz /usr/share/postgresql /usr/share/postgresql/postgres.bki /usr/share/postgresql/postgres.description /usr/share/postgresql/postgres.shdescription /usr/share/postgresql/postgresql.conf /usr/share/postgresql/postgresql.conf.sample |
随后是联合国安装的企业号安装9.1。你最可能需要用你的版本编号来替换Folder/9.1。如果你不存在,你很可能用不同的方法安装Postgresql,如
To remove the enterprisedb one-click install of postgresql 9.1:
运行,运行
1 | sudo /Library/PostgreSQL/9.1/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh |
如果你安装邮件,你可以:
ZZU1
It will ask for the administrator password and run the uninstaller.
Remove the postgresql and data folders.魔鬼会告诉你,他们没有被清除。
1 | sudo rm -rf /Library/PostgreSQL |
Remove the INI file:
1 | sudo rm /etc/postgres-reg.ini |
使用系统优惠->使用者群来清除后台用户。
恢复你的共享记忆设置:
1 | sudo rm /etc/sysctl.conf |
这应该是全部!如果你不介意的话
家居安装
假设您安装的PostgresQl与
企业安装
如果你使用企业安装,然后看到其他的答案在这个威胁。
如果你跟随"下载"链接的主要网站,企业安装就是你得到的。后台团队只发布源代码,因此企业建设公司作为一个短期的社区安装。
后台
你可能也使用过
这个双击MAC App包含后台引擎。
我不使用同一个版本,但单一行动是一样的:查找文件的唯一位置
1 | /Library/PostgreSQL/9.6 |
MGX1〔0〕
然后运行它。
MGX1〔1〕
(Screenshot in Macos 10.13)
然后
1 | sudo rm -rf /Library/PostgreSQL/ |
删除所有不需要的目录。
我不能单枪匹马。但我终于找到了这个(我用家居用具安装的海报)
1 | brew list |
看着正确的名字。像这样的事
1 | postgresql9 |
一旦你找到正确的名字
1 | brew uninstall postgresql9 |
这应该是单纯的。
这是一个非常好的博客
(Just replace 9.X by your version.)E.G:9.6)
如果安装后的家庭,Enter
b.如果您使用企业安装,跟随步伐。
在终端窗口运行
c.If installed with postgres instandation,do:
打开
Remove the postgresql and data folders.魔鬼会告诉你,他们没有被清除。
1 | sudo rm -rf /Library/PostgreSQL |
Remove the INI file:
1 | sudo rm /etc/postgres-reg.ini |
使用系统优惠->使用者群来清除后台用户。
点击Padlock设置面板并输入密码。选择小按钮上的Postgresql使用者和单击。恢复你的共享记忆设置
单一议院:
1 | sudo /Library/PostgreSQL/9.6/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh |
Removing the data file:
1 | sudo rm -rf /Library/PostgreSQL |
Removing the configs:
1 | sudo rm /etc/postgres-reg.ini |
然后就这样
打开终端与类型下命令与击中
1 | sudo /Library/PostgreSQL/9.X/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh |
如果你在官方网站上安装图形安装,如果你安装在缺陷位置…
你可以在你的家庭目录中找到你的独一无二
请您在您的机器上安装多个版本的邮件。你可以通过
1 | brew uninstall --force postgresql |