Ad Widget

Collapse

Zabbix agent uninstall from ubuntu box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avecsi
    Member
    • Nov 2013
    • 40

    #1

    Zabbix agent uninstall from ubuntu box

    Hi All,

    On my ubuntu box I cannot remove the zabbix agent:


    # aptitude reinstall -f zabbix-agent
    Code:
    The following packages will be REINSTALLED:
      zabbix-agent
    0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
    Need to get 0 B/278 kB of archives. After unpacking 0 B will be used.
    Selecting previously unselected package zabbix-agent.
    (Reading database ... 107824 files and directories currently installed.)
    Preparing to replace zabbix-agent 1:2.0.2+dfsg-3 (using .../zabbix-agent_1%3a2.0.2+dfsg-3_amd64.deb) ...
    invoke-rc.d: initscript zabbix-agent, action "stop" failed.
    dpkg: warning: subprocess old pre-removal script returned error exit status 1
    dpkg - trying script from the new package instead ...
    invoke-rc.d: initscript zabbix-agent, action "stop" failed.
    dpkg: error processing /var/cache/apt/archives/zabbix-agent_1%3a2.0.2+dfsg-3_amd64.deb (--unpack):
     subprocess new pre-removal script returned error exit status 1
    invoke-rc.d: initscript zabbix-agent, action "start" failed.
    dpkg: error while cleaning up:
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/zabbix-agent_1%3a2.0.2+dfsg-3_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    A package failed to install.  Trying to recover:
    dpkg: error processing zabbix-agent (--configure):
     Package is in a very bad inconsistent state - you should
     reinstall it before attempting configuration.
    Errors were encountered while processing:
     zabbix-agent


    # dpkg --list | grep zabbix
    Code:
    iFR zabbix-agent                      1:2.0.2+dfsg-3                      network monitoring solution - agent
    Is there any solution for this?

    Thanks,
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    try to "kill" zabbix_agent daemon before uninstall.
    sometimes it's hard to stop it from working
    Sincerely yours,
    Aleksey

    Comment

    • avecsi
      Member
      • Nov 2013
      • 40

      #3
      Code:
      # killall -9 zabbix_agentd
      Code:
      # ps -ef | grep zabbix
      root     18079 11528  0 15:32 pts/0    00:00:00 grep --color=auto zabbix
      Code:
      # aptitude purge -f zabbix-agent
      The following packages will be REMOVED:
        zabbix-agent{p}
      0 packages upgraded, 0 newly installed, 1 to remove and 8 not upgraded.
      Need to get 0 B of archives. After unpacking 689 kB will be freed.
      Do you want to continue? [Y/n/?] y
      dpkg: error processing zabbix-agent (--purge):
       Package is in a very bad inconsistent state - you should
       reinstall it before attempting a removal.
      No apport report written because MaxReports is reached already
                                                                    Errors were encountered while processing:
       zabbix-agent
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      A package failed to install.  Trying to recover:
      Didnt help.

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        check this link
        Sincerely yours,
        Aleksey

        Comment

        Working...