Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Monitoring
  • Getting started
    • Overview
    • Installing and updating
    • Starting and stopping
    • Agent best practices
    • Possible errors
    • Deletion
  • Access management
  • Terraform reference
  • Release notes
  1. Metric collection agent
  2. Deletion

Deleting Yandex Unified Agent

Written by
Yandex Cloud
Updated at March 6, 2025

The way you delete Unified Agent depends on the way it was installed.

Docker image
deb package
Binary file
When creating a VM
  1. View the Unified Agent container ID:

    sudo docker ps
    
  2. Stop the container:

    sudo docker stop <container_ID>
    
  3. Delete the container:

    sudo docker rm <container_ID>
    
  1. Stop Unified Agent:

    sudo service unified-agent stop
    
  2. View the deb package name:

    sudo dpkg -S /etc/yandex/unified_agent
    
  3. Delete the deb package:

    sudo apt remove yandex-unified-agent
    
  1. View the Unified Agent process number and the location of the unified_agent file and *.yml configuration file:

    ps aux | grep unified_agent
    

    Result:

    root 1068 0.0 2.1 2314804 43540 ? Ssl 08:33 0:03 /bin/unified_agent --config /etc/yc/unified_agent/config.yml
    yc-sa-a+ 4124 0.0 0.1 6612 2272 pts/2 S+ 12:34 0:00 grep --color=auto unified_agent
    

    In this example, the process number is 1068.

  2. Stop the Unified Agent process:

     sudo kill <process_number>
    
  3. Delete the binary file:

    sudo rm -f /usr/bin/unified_agent
    
  4. Delete the configuration file:

    sudo rm -f /etc/yc/unified_agent/config.yml
    

If Unified Agent was installed this way, the unified_agent binary file and the config.yml default configuration file are copied to the VM. Therefore, Unified Agent is deleted the same way as the binary file.

Information about the installed Unified Agent is stored in the VM metadata. When deleting Unified Agent, metadata is not updated automatically; however, you can do it manually.

Note

Information in metadata does not affect Unified Agent's operation, so updating is optional.

To delete information about Unified Agent from metadata:

  1. Get an IAM token for your VM's service account.

  2. Make sure you have installed cURL.

  3. Send an API request to update metadata:

    curl \
      --request PATCH \
      --header "Authorization: Bearer <IAM_token>" \
      --data '{"updateMask": "metadata", "metadata": {"install-unified-agent": "0" },}' \
      https://compute.api.cloud.yandex.net/compute/v1/instances/<VM_ID>
    
  4. View metadata:

    1. In the management console, go to Compute Cloud.

    2. In the left-hand panel, select Virtual machines.

    3. Select the VM and navigate to the Overview tab.

    4. Make sure the Agent for delivering metrics parameter is now set to no under Monitoring.

Was the article helpful?

Previous
Possible errors
Next
Service overview
© 2025 Direct Cursus Technology L.L.C.