11

Offline: Data Deletion

Steps to erase all site data from the training machine after deployment is verified and before leaving. There is no dedicated deletion script, so follow this checklist.

Principles

After the site model is deployed and verified, erase all site data from the training machine, confirm it is gone, and record it.

PrincipleDescription
Before leavingDelete on the spot when done; never carry data back to delete later.
After verifying deploymentDo not delete before confirming on the device that the new model is applied.
Verify deletionDo not stop at running delete commands; confirm nothing remains.
Models are deleted tooTrained models on the training machine are also erased. If you need to take one out, agree with the AI team first.
Irreversible
Deletion cannot be undone. Before running it, confirm the site name and device IP and that no other site's work is in progress.

Where Data Remains

Where site data is stored and how to erase it.

LocationContentsHow to delete
Studio dataUploaded videos, labels, datasets, training results, request historyStep 3 bash stop.sh --clean
Registered device infoDevice IP and SSH account (including password)Step 1 delete in [Device Management]; also removed in step 3
Training scratch dataDatasets and intermediate results copied during trainingStep 2 empty /data/argo
Training job recordsFinished training jobs and podsStep 2 delete workflows
Settings file.env.backend (contains secrets)Step 4 cleanup (follow AI team guidance)
Temporary files on the deviceTemporary files created on the device during the buildStep 5 check and delete
Import mediaVideos brought in via USB, etc.Format/delete on site
Do Not Delete What Stays on the Device
The new model and class information deployed to the device are the product of this work and are kept. On the device only clean the temporary files in step 5 below.

Step 1. Delete the Device

The SSH password is stored there, so delete it first.

  1. Open [AI Update] > [Device Management].
  2. Click the trash icon of each device and then [Delete].
    "Device deleted" means success. On failure retry; if it still fails, step 3 covers it.
  3. When the list is empty click [Close].
What This Deletes
It only removes the device record stored in Studio. The device itself and the model deployed on it are not affected.

Step 2. Delete Training Jobs and Scratch Data

stop.sh does not touch these, so delete them yourself. Run with sudo on the training machine.

  1. Check the current state and size.
    sudo k3s kubectl get workflows,pods -n argo-workflow sudo du -sh /data/argo/*
  2. Delete all training jobs (workflows).
    sudo k3s kubectl delete workflows --all -n argo-workflow
  3. Check the remaining pods.
    Run sudo k3s kubectl get pods -n argo-workflow and confirm only Argo's own pods remain. If a training pod is Terminating, wait until it is gone.
  4. Empty the contents of the three folders in /data/argo.
    sudo find /data/argo/vunex-dataset /data/argo/gpu-comm /data/argo/trt-cache -mindepth 1 -delete
  5. Check the result.
    Run sudo du -sh /data/argo/* and confirm each folder is nearly empty.
Do Not Delete the Folders Themselves
These folders are reused as training storage, so delete only their contents; -mindepth 1 does that. Never rm -rf /data or /data/argo itself.

Step 3. Delete Studio Data

Erase all data stored in Studio and stop the services.

  1. Run it in the Studio folder.
    cd vunex-studio-offline && bash stop.sh --clean
  2. Read the warning and type yes.
    Anything other than yes ends with "Cancelled." and nothing is deleted.
  3. Confirm the "stopped" message.
Training Images Are Also Erased
The prompt mentions only part of it, but this command erases all Studio storage volumes, including the internal image store. Before the next site, ask the AI team to reload the training images and do a test start.

Step 4. Settings and Temporary Files

Clean up the remaining traces.

TargetHowNotes
.env.backendDelete or keep as the AI team instructsContains secrets, not data. It is recreated at the next visit.
Files you openedCheck downloads, desktop and temp foldersNo videos or exported files should remain.
Shell historyhistory -c if neededClear it if a command with a password was typed.

Step 5. Check Temporary Files on the Device

Engine build/deploy creates temporary files in the device's /tmp that are removed automatically on success. After a failure or interruption they may remain, so check them. Connect over SSH with the site owner present.

  1. SSH into the device and look for leftover temporary files.
    ls -d /tmp/tmp.* 2>/dev/null; ls /tmp/vunex_* 2>/dev/null
  2. Check what is inside any leftover folder.
    ls -l /tmp/tmp.XXXXXX β€” for this build it contains the trained model file.
  3. Delete only when sure it belongs to this build.
    rm -rf /tmp/tmp.XXXXXX (replace XXXXXX with the real name). Always check the name by eye.
Do Not Delete the Device's Model
Deleting the new model deployed on the device can break it. On the device clean only the temporary files above.

Verify and Record

Do not stop at deleting; verify and keep a record.

TargetHowExpected
Studio storagedocker volume ls | grep vunex-studio-offlineNo data volumes listed
Training jobssudo k3s kubectl get workflows -n argo-workflowNo jobs
Scratch datasudo du -sh /data/argo/*Nearly 0
Video/model files`sudo find /home /data /tmp /mnt -xdev -newermt "" \( -name "*.mp4" -o -name "*.avi" -o -name "*.onnx" -o -name "*.plan" -o -name "*.pth" \) 2>/dev/null`No output
(Optional) Empty-state checkStart with `bash start.sh ` and log inAI Update, Collected Videos, Datasets and Devices are all empty. Stop again with bash stop.sh
RecordContent
Site / date / ownerSite name, work date, owner
Deployed modelModel name and device model version before/after
Evaluation summaryBefore/after mAP (without site information)
Deletion doneTime deleted and the verification results
Keeping the Record
Do not write passwords or tokens in the record either. Where and how to keep it follows company policy or the AI team.