brew 를 사용해서 postgresql 을 uninstall 을 하는 방법을 적으려고 한다.
일반적인 방법인 brew uninstall postgresql 로 완벽히 지워지지 않아서 적는다.
brew uninstall postgresql 명령어를 사용해서 지웠는데도 이렇게 남아있다.
limjian@Jians-MacBook-Pro-13 postgres % brew uninstall postgres
Uninstalling /usr/local/Cellar/postgresql/14.1_1... (3,304 files, 43.9MB)
limjian@Jians-MacBook-Pro-13 ~ % cd /usr/local/var/postgres
limjian@Jians-MacBook-Pro-13 postgres % ls
PG_VERSION pg_dynshmem pg_multixact pg_snapshots pg_tblspc postgresql.auto.conf
base pg_hba.conf pg_notify pg_stat pg_twophase postgresql.conf
global pg_ident.conf pg_replslot pg_stat_tmp pg_wal postmaster.opts
pg_commit_ts pg_logical pg_serial pg_subtrans pg_xact postmaster.pid
# step 1
pg_ctl stop -D /usr/local/var/postgres && brew services stop postgresql
(서비스 stop / postgres dafault 경로가 /usr/local/var/postgres)
limjian@Jians-MacBook-Pro-13 ~ % pg_ctl stop -D /usr/local/var/postgres && brew services stop postgresql
waiting for server to shut down....2022-01-30 01:42:08.069 KST [48164] LOG: received fast shutdown request
2022-01-30 01:42:08.069 KST [48164] LOG: aborting any active transactions
2022-01-30 01:42:08.071 KST [48164] LOG: background worker "logical replication launcher" (PID 48171) exited with exit code 1
2022-01-30 01:42:08.071 KST [48166] LOG: shutting down
2022-01-30 01:42:08.079 KST [48164] LOG: database system is shut down
done
server stopped
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
limjian@Jians-MacBook-Pro-13 ~ % ps -ef | grep "postgres"
501 49160 25522 0 1:42AM ttys000 0:00.01 grep postgres
# step 2
brew uninstall --force postgresql
limjian@Jians-MacBook-Pro-13 ~ % brew uninstall --force postgresql
Uninstalling postgresql... (3,304 files, 43.9MB)
# step 3
rm -rf /usr/local/var/postgres
limjian@Jians-MacBook-Pro-13 ~ % rm -rf /usr/local/var/postgres
'Database > PostgreSQL' 카테고리의 다른 글
[PostgreSQL] no schema has been selected to create in (0) | 2022.08.03 |
---|---|
[PostgreSQL] cache clear (0) | 2022.02.09 |
[PostgreSQL] Install for Mac (0) | 2022.01.30 |
[PostgreSQL] 현재 연결 수 (pg_stat_activity) (1) | 2021.12.11 |
[PostgreSQL] Lock query 확인 (0) | 2021.12.11 |