Page 2 of 2

Re: is it possible to uninstall Nagios

PostPosted: Thu Nov 15, 2012 1:46 pm
by lmiltchev

Re: is it possible to uninstall Nagios

PostPosted: Thu Nov 15, 2012 2:10 pm
by benhank

You guys are teh bomb!

I got an access denied error at first but then I ran:
Code: Select all
cd /tmp
chmod +x /tmp/

Code: Select all

root@# ./
        WARNING: This script will uninstall


        from this system as well as all data associated with these services.
        This action is irreversible and will result in the removal of
        all Nagios databases, configuration files, log files, and services.

Are you sure you want to continue? [y/N] y
Proceeding with uninstall...
Stopping services...
Stopping nagios: done.
NPCD Stopped.
Stopping ndo2db: done.
removing init files...
Removing users and suduoers...
userdel: user nagios is currently logged in
Removing crontabs...
Removing files...
Removing NagiosQL files...
Removing Apache configs...
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Removing xinetd configs...
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
Removing Postgres and mysql databases...
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.61-4.el6 will be erased
--> Processing Dependency: mysql for package: nagiosxi-deps-2011r3.3-1.noarch
--> Processing Dependency: mysql = 5.1.61-4.el6 for package: mysql-devel-5.1.61-4.el6.x86_64
--> Processing Dependency: mysql = 5.1.61-4.el6 for package: mysql-server-5.1.61-4.el6.x86_64
---> Package postgresql.x86_64 0:8.4.12-1.el6_2 will be erased
--> Processing Dependency: postgresql(x86-64) = 8.4.12-1.el6_2 for package: postgresql-devel-8.4.12-1.el6_2.x86_64
--> Processing Dependency: postgresql(x86-64) = 8.4.12-1.el6_2 for package: postgresql-server-8.4.12-1.el6_2.x86_64
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.61-4.el6 will be erased
---> Package mysql-server.x86_64 0:5.1.61-4.el6 will be erased
---> Package nagiosxi-deps.noarch 0:2011r3.3-1 will be erased
---> Package postgresql-devel.x86_64 0:8.4.12-1.el6_2 will be erased
---> Package postgresql-server.x86_64 0:8.4.12-1.el6_2 will be erased
--> Finished Dependency Resolution
base                                                     | 3.7 kB     00:00
cr                                                       | 3.0 kB     00:00
epel/metalink                                            |  11 kB     00:00
epel                                                     | 4.3 kB     00:00
epel/primary_db                                          | 4.8 MB     00:02
extras                                                   | 3.5 kB     00:00
rpmforge                                                 | 1.9 kB     00:00
updates                                                  | 3.5 kB     00:00
updates/primary_db                                       | 3.9 MB     00:04

Dependencies Resolved

Package          Arch   Version        Repository                         Size
mysql            x86_64 5.1.61-4.el6   @base                             2.4 M
postgresql       x86_64 8.4.12-1.el6_2 @updates                           14 M
Removing for dependencies:
mysql-devel      x86_64 5.1.61-4.el6   @base                             387 k
mysql-server     x86_64 5.1.61-4.el6   @base                              25 M
nagiosxi-deps    noarch 2011r3.3-1     @/nagiosxi-deps-2011r3.3-1.noarch 0.0
postgresql-devel x86_64 8.4.12-1.el6_2 @updates                          3.4 M
                  x86_64 8.4.12-1.el6_2 @updates                           14 M

Transaction Summary
Remove        7 Package(s)

Installed size: 59 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Erasing    : nagiosxi-deps-2011r3.3-1.noarch                              1/7
  Erasing    : mysql-devel-5.1.61-4.el6.x86_64                              2/7
  Erasing    : mysql-server-5.1.61-4.el6.x86_64                             3/7
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
  Erasing    : postgresql-devel-8.4.12-1.el6_2.x86_64                       4/7
  Erasing    : postgresql-server-8.4.12-1.el6_2.x86_64                      5/7
  Erasing    : postgresql-8.4.12-1.el6_2.x86_64                             6/7
  Erasing    : mysql-5.1.61-4.el6.x86_64                                    7/7

  mysql.x86_64 0:5.1.61-4.el6         postgresql.x86_64 0:8.4.12-1.el6_2

Dependency Removed:
  mysql-devel.x86_64 0:5.1.61-4.el6
  mysql-server.x86_64 0:5.1.61-4.el6
  nagiosxi-deps.noarch 0:2011r3.3-1
  postgresql-devel.x86_64 0:8.4.12-1.el6_2
  postgresql-server.x86_64 0:8.4.12-1.el6_2

Removing database backup scripts...

[root@LkennagiosT01 tmp]#

Now I pride myself on being one greedy basket =D, If you add the script that automates the install of XI and call it "XI_CleanRebuild.SH or something like that" We can all flash back to the seventies and do the John Travola disco in your honor dance in the privacy of our own cubes muhahahah....

either way great job and awesome follow up. You hve just helped me to save a lot of gas and wasted time.

A not e for the fellas who may want to wipe out their nagvis and nagxyz addons this wont to it but it perfectly wipes out xi.

Re: is it possible to uninstall Nagios

PostPosted: Thu Nov 15, 2012 2:25 pm
by benhank
benhank wrote:I started the thread, so I will be the first to boldy go where no >insert gender neutral politically correct word here< gone before! ...coughonmytestservercough =K

I was saying that since I asked 1st I would test the uninstall script 1st too. the rest was just a corny joke.

Re: is it possible to uninstall Nagios

PostPosted: Thu Nov 15, 2012 2:29 pm
by lmiltchev
Thanks for the feedback...and for bringing back some nice memories from the 70s! :)