얕고넓은지식/linux

linux ceontos7 mariadb 삭제

쪽마 2023. 3. 28. 14:31
반응형

설치되어있던거 확인

[root@localhost /]# yum list installed mariadb\*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * epel: ftp.iij.ad.jp
 * extras: mirror.kakao.com
 * remi-php74: ftp.riken.jp
 * remi-safe: ftp.riken.jp
 * updates: mirror.kakao.com
http://yum.mariadb.org/10.1/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

Installed Packages
MariaDB-client.x86_64               10.1.48-1.el7.centos                @mariadb
MariaDB-common.x86_64               10.1.48-1.el7.centos                @mariadb
MariaDB-server.x86_64               10.1.48-1.el7.centos                @mariadb
[root@localhost /]#

 

 

 

설치되어있던거 삭제

[root@localhost /]# yum remove MariaDB-server.x86_64
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.1.48-1.el7.centos will be erased
--> Finished Dependency Resolution
http://yum.mariadb.org/10.1/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.


Dependencies Resolved

================================================================================
 Package             Arch        Version                    Repository     Size
================================================================================
Removing:
 MariaDB-server      x86_64      10.1.48-1.el7.centos       @mariadb      117 M

Transaction Summary
================================================================================
Remove  1 Package

Installed size: 117 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : MariaDB-server-10.1.48-1.el7.centos.x86_64                   1/1
warning: /etc/my.cnf.d/server.cnf saved as /etc/my.cnf.d/server.cnf.rpmsave
  Verifying  : MariaDB-server-10.1.48-1.el7.centos.x86_64                   1/1

Removed:
  MariaDB-server.x86_64 0:10.1.48-1.el7.centos

Complete!
[root@localhost /]#

 

 

 

 

혹시모르니

아래명령어로 찌꺼기 등등 다 삭제

 

[root@localhost /]# yum remove -y mariadb mariadb-server    //Mariadb 설치 제거
[root@localhost /]# rm -rf /var/lib/mysql   //Mariadb에 사용되었던 각종 찌꺼기 파일 제거
[root@localhost /]# rm /etc/my.cnf  //Mariadb에 사용되었던 각종 찌꺼기 파일 제거
rm: remove regular file ‘/etc/my.cnf’? y
[root@localhost /]# rm /var/log/mariadb/mariadb.log.rpmsave  //mariadb가 사용했던 모든 로그까지 제거 (옵션)
rm: remove regular file ‘/var/log/mariadb/mariadb.log.rpmsave’? y
[root@localhost /]# rm -rf /usr/lib64/mysql/
[root@localhost /]# rm -rf /usr/share/mysql/
[root@localhost /]# yum -y remove mariadb-libs  //mariadb 라이브러리 제거 명령
Loaded plugins: fastestmirror, langpacks
No Match for argument: mariadb-libs
No Packages marked for removal
[root@localhost /]# rpm -qa | grep -i mariadb //제거 후 완전히 제거되었나 확인
MariaDB-client-10.1.48-1.el7.centos.x86_64
MariaDB-common-10.1.48-1.el7.centos.x86_64
[root@localhost /]# systemctl stop mysqld
[root@localhost /]# yum remove mariadb*  ///Mariadb 제거
Loaded plugins: fastestmirror, langpacks
No Match for argument: mariadb*
No package mariadb* available.
  * Maybe you meant: MariaDB-common, MariaDB-client
No Packages marked for removal
[root@localhost /]#

 

 

 

 

반응형