---
title: "التحديث والتراجع وإلغاء التثبيت | Wantastic Docs"
description: "حدّث wantasticd أو أزله بسطر واحد لكل نظام تشغيل. وأيضًا: كيف يعمل التحديث التلقائي، وكيف توقفه، وكيف تتراجع إلى الملف التنفيذي السابق، وكيف تمحو كل البيانات."
url: "https://wantastic.app/ar/docs/update-and-uninstall"
category: "Install wantasticd"
reading_time: "5 دقائق"
---

# التحديث والتراجع وإلغاء التثبيت

حدّث wantasticd أو أزله بسطر واحد لكل نظام تشغيل. وأيضًا: كيف يعمل التحديث التلقائي، وكيف توقفه، وكيف تتراجع إلى الملف التنفيذي السابق، وكيف تمحو كل البيانات.

> **Outcome:** تستطيع تحديث wantasticd أو إزالته بأمر واحد، والتعافي من تحديث سيئ خلال دقيقة، والتحكم في التحديث التلقائي.

## Before you start

- صلاحيات root أو Administrator على الجهاز.

## التحديث أو إلغاء التثبيت بسطر واحد

اختر نظامك. يحتفظ التحديث بالمطالبة والإعدادات. ويحتفظ إلغاء التثبيت بالإعدادات أيضًا، فيعيد التثبيت لاحقًا الاتصال كالجهاز نفسه.

### Linux / macOS

التحديث / إلغاء التثبيت:

```bash
# update
sudo wantasticd update
# uninstall (keeps the config)
curl -fsSL https://get.wantastic.app/install.sh | sudo sh -s -- --uninstall
```

### OpenWrt / Alpine

التحديث / إلغاء التثبيت (بصلاحيات root):

```sh
# update
wantasticd update
# uninstall (keeps the config)
wget -qO- https://get.wantastic.app/install.sh | sh -s -- --uninstall
```

### BusyBox

حدّث يدويًا على BusyBox، لأن التحديث التلقائي قد يشغّل نسخة ثانية هناك. ضع إصدارك مكان <arch>.

التحديث / إلغاء التثبيت (بصلاحيات root):

```sh
# update
cd /tmp && TAG=$(wget -qO- https://get.wantastic.app/latest | cut -d+ -f1) && wget -O w.tgz https://get.wantastic.app/$TAG/wantasticd-linux-<arch>.tar.gz && tar -xzf w.tgz && ./wantasticd version && cp /usr/bin/wantasticd /usr/bin/wantasticd.previous && cp wantasticd /usr/bin/wantasticd.new && mv /usr/bin/wantasticd.new /usr/bin/wantasticd && killall wantasticd
# uninstall (keeps the config)
wget -qO- https://get.wantastic.app/install.sh | sh -s -- --uninstall
```

### Windows

PowerShell (Administrator):

```powershell
# update
wantasticd update
# uninstall (keeps the config)
sc.exe stop wantasticd; sc.exe delete wantasticd; Get-Process wantasticd -ErrorAction SilentlyContinue | Stop-Process -Force; Remove-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'Wantastic' -ErrorAction SilentlyContinue; Remove-Item -Recurse -Force 'C:\Program Files\Wantastic'
```

> لا تشغّل install.ps1 مرة أخرى لمجرد التحديث. فهو يسجّل الدخول من جديد وقد يستبدل إعدادات تعمل.

### Docker

التحديث / إلغاء التثبيت:

```bash
# update: rebuild the image, then start the container again
docker build --no-cache -t wantasticd-local --build-arg WANTASTIC_ARCH=amd64 .
docker rm -f wantasticd
# uninstall
docker rm -f wantasticd && docker volume rm wantastic
```

*wantasticd update: يعمل التحديث في الخلفية. تعيد الخدمة التشغيل على الإصدار الجديد.*

```
$ $ sudo wantasticd update
Updating from v1.0.53+9c1e2aa to v1.0.54+377f3c0...
2026/10/29 09:20:11 Running update script for version v1.0.54+377f3c0 (target: /usr/local/bin/wantasticd, log: /tmp/wantasticd-update-3141.log)...
$ $ wantasticd version
wantasticd version v1.0.54+377f3c0
$ $ sudo wantasticd update
No newer release available: current=v1.0.54+377f3c0 offered=v1.0.54+377f3c0
```

> **Tip:** لا يزيل إلغاء التثبيت الجهاز من حسابك. احذفه من نافذة Devices في وحدة التحكم (الصف → Delete) لتحرير المكان.

## إزالة كل شيء (purge)

يحذف --purge أيضًا الإعدادات ومفاتيح الجهاز. يحتاج التثبيت اللاحق عندئذٍ إلى مطالبة جديدة.

المحو الكامل:

```bash
# Linux / macOS
curl -fsSL https://get.wantastic.app/install.sh | sudo sh -s -- --purge
# OpenWrt / Alpine / BusyBox (as root)
wget -qO- https://get.wantastic.app/install.sh | sh -s -- --purge
```

Windows (بعد سطر إلغاء التثبيت):

```powershell
Remove-Item -Recurse -Force 'C:\ProgramData\Wantastic'
```

| المنصة | يزيل --uninstall | ويزيل --purge أيضًا |
| --- | --- | --- |
| Linux (systemd) | وحدة الخدمة، والملفات التنفيذية (+ .previous/.new)، والعملية العاملة | /etc/wantastic, /usrdata/wantastic |
| OpenWrt / OpenRC / SysV | /etc/init.d/wantasticd وروابط مستويات التشغيل الخاصة به، والملفات التنفيذية | /etc/wantastic |
| BusyBox | سكربت التهيئة، وسطر inittab (ثم kill -HUP 1)، والملفات التنفيذية | /etc/wantastic |
| macOS | ملفا plist لكل من LaunchDaemon وLaunchAgent، والملفات التنفيذية | /Library/Application Support/Wantastic, /Library/Logs/Wantastic |

*إلغاء التثبيت: بدون --purge تبقى الإعدادات، فيعيد التثبيت لاحقًا الاتصال كالجهاز نفسه.*

```
$ $ curl -fsSL https://get.wantastic.app/install.sh | sudo sh -s -- --uninstall
=== Uninstalling wantasticd ===
Removed "/etc/systemd/system/multi-user.target.wants/wantasticd.service".
Configuration kept (use --purge to remove it).
wantasticd uninstalled.
```

## كيف يعمل التحديث التلقائي

- التحديث التلقائي مفعّل افتراضيًا. تتحقق الخدمة من وجود إصدار جديد بعد دقيقة من البدء، ثم كل ساعة.
- لا يثبّت إلا الإصدارات الأحدث. ولا يرجع أبدًا إلى إصدار أقدم.
- يحتفظ بالملف التنفيذي القديم باسم .previous، ويعيد تشغيل الخدمة ويتحقق من سلامتها. وإن لم تكن سليمة، يعيد الملف التنفيذي القديم.
- تُسجَّل الإخفاقات ويُعاد المحاولة في الفحص التالي كل ساعة.

## إيقاف التحديث التلقائي

أضف --no-auto-update إلى الأمر الذي تشغّله خدمتك.

### systemd

تجاوز ExecStart:

```bash
sudo systemctl edit wantasticd
# [Service]
# ExecStart=
# ExecStart=/usr/local/bin/wantasticd connect --config "/etc/wantastic/config.conf" --no-auto-update
sudo systemctl restart wantasticd
wantasticd status | grep 'Auto update'
```

### OpenWrt (procd)

عدّل سطر الأمر:

```sh
sed -i "s|connect --config '/etc/wantastic/config.conf'|connect --config '/etc/wantastic/config.conf' --no-auto-update|" /etc/init.d/wantasticd
/etc/init.d/wantasticd restart
```

### OpenRC

عدّل command_args:

```sh
# /etc/init.d/wantasticd
command_args="connect --config '/etc/wantastic/config.conf' --no-auto-update"
rc-service wantasticd restart
```

### BusyBox

عدّل سطر exec:

```sh
sed -i 's| connect --config \(.*\)$| connect --config \1 --no-auto-update|' /etc/init.d/wantasticd
killall wantasticd
```

### macOS

أضف <string>--no-auto-update</string> بعد <string>--tray=false</string> في ملف plist، ثم أعد تحميله.

إعادة تحميل LaunchDaemon:

```bash
sudo nano /Library/LaunchDaemons/com.wantastic.wantasticd.plist
sudo launchctl bootout system/com.wantastic.wantasticd
sudo launchctl bootstrap system /Library/LaunchDaemons/com.wantastic.wantasticd.plist
```

### Windows

PowerShell (Administrator):

```powershell
sc.exe config wantasticd binPath= '"C:\Program Files\Wantastic\wantasticd.exe" connect --config "C:\ProgramData\Wantastic\config.conf" --tray=false --no-auto-update'
Restart-Service wantasticd
```

> **Operational note:** تعيد إعادة تشغيل المثبّت كتابة الخدمة بدون --no-auto-update. طبّق تغييرك مرة أخرى بعد ذلك.

## التراجع إلى الملف التنفيذي السابق

يحتفظ كل تثبيت وتحديث بالملف التنفيذي القديم باسم .previous بجانب الحالي.

### Linux (systemd)

التراجع:

```bash
sudo systemctl stop wantasticd
sudo mv /usr/local/bin/wantasticd.previous /usr/local/bin/wantasticd
sudo systemctl start wantasticd
```

### OpenWrt

التراجع:

```sh
/etc/init.d/wantasticd stop
mv /usr/bin/wantasticd.previous /usr/bin/wantasticd
/etc/init.d/wantasticd start
```

### macOS

التراجع:

```bash
sudo launchctl bootout system/com.wantastic.wantasticd
sudo mv /usr/local/bin/wantasticd.previous /usr/local/bin/wantasticd
sudo launchctl bootstrap system /Library/LaunchDaemons/com.wantastic.wantasticd.plist
```

### Windows

PowerShell (Administrator):

```powershell
Stop-Service wantasticd
Get-Process wantasticd -ErrorAction SilentlyContinue | Stop-Process -Force
Rename-Item "C:\Program Files\Wantastic\wantasticd.exe" wantasticd.exe.bad
Rename-Item "C:\Program Files\Wantastic\wantasticd.exe.previous" wantasticd.exe
Start-Service wantasticd
```

> **Warning:** سيعيدك التحديث التلقائي إلى الإصدار الأحدث خلال ساعة. أوقف التحديث التلقائي (أعلاه) للبقاء على الإصدار الأقدم، وأخبر الدعم بالإصدار الذي سبّب العطل.

## Verify the result

- بعد التحديث: يعرض wantasticd version الإصدار الجديد ويعرض status القيمة Connected.
- بعد إيقاف التحديثات: يعرض wantasticd status القيمة Auto update: false.
- بعد إلغاء التثبيت: لا يطبع which wantasticd شيئًا ولم تعد الخدمة موجودة.

## Common issues

### يفشل التحديث ويستمر الإصدار القديم في العمل.

```
Self-update failed; agent remains active and will retry on the next scheduled check: …
```

- **Where:** سجل الخدمة
- **Likely cause:** فشل التنزيل أو التحقق أو إعادة التشغيل. يبقى الوكيل يعمل على الإصدار الحالي.
- **Fix:** اقرأ سجل التحديث، وأصلح السبب (الشبكة، المساحة على القرص)، ثم حدّث مجددًا.

اقرأ السجل، ثم أعد المحاولة:

```bash
ls -t /tmp/wantasticd-update-*.log | head -n 1 | xargs tail -n 50
sudo wantasticd update
```

### تراجع التحديث من تلقاء نفسه.

```
Error: updated service failed health verification; restoring previous binary
```

- **Where:** سجل التحديث
- **Likely cause:** لم يبدأ الإصدار الجديد بشكل صحيح. استُعيد الإصدار السابق.
- **Fix:** لا شيء لإصلاحه على الجهاز. أخبر الدعم برقم الإصدار، وأوقف التحديث التلقائي حتى يصدر إصلاح.

### يرفض التحديث العمل في حاوية أو خدمة مخصصة.

```
Error: no supported service manager found; refusing an unverifiable update
```

- **Where:** سجل التحديث
- **Likely cause:** لا توجد خدمة launchd أو systemd أو procd أو OpenRC أو init.d لإعادة تشغيلها.
- **Fix:** استخدم --no-auto-update وحدّث باستبدال الملف التنفيذي (أو بإعادة بناء الصورة).

### يفشل التحديث على نظام ملفات ممتلئ أو للقراءة فقط.

```
Error: cannot write to /usr/bin (check permissions)
```

- **Where:** سجل التحديث
- **Likely cause:** مجلد الملف التنفيذي للقراءة فقط أو ممتلئ ("Error: cannot back up <bin>" هي المشكلة نفسها).
- **Fix:** حرّر بعض المساحة، ثم حدّث مجددًا.

تحقق من المساحة، ثم أعد المحاولة:

```bash
df -h
sudo wantasticd update
```

### انتهت مهلة التحديث.

```
update attempt timed out after 7m0s (log kept at /tmp/wantasticd-update-XXXX.log)
```

- **Where:** سجل الخدمة
- **Likely cause:** الاتصال بطيء جدًا، أو أن إعادة تشغيل الخدمة علقت.
- **Fix:** شغّل التحديث يدويًا عندما يتحسن الاتصال. للاتصالات البطيئة، ارفع قيمة WANTASTIC_UPDATE_DOWNLOAD_TIMEOUT.

إعادة المحاولة:

```bash
sudo wantasticd update
```

### يرفض ملف تنفيذي مبني ذاتيًا التحديث.

```
Invalid update version: parse current version: version "dev" is not major.minor.patch
```

- **Where:** wantasticd update
- **Likely cause:** تُبلغ الإصدارات المبنية محليًا عن الإصدار dev.
- **Fix:** ثبّت إصدارًا رسميًا باستخدام المثبّت.

تثبيت الإصدار الرسمي:

```bash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh
```

### تراجع تحديث Windows.

```
update-finish: wantasticd unhealthy after update to <v>: …; restoring previous binary
```

- **Where:** أداة التحديث المساعدة في Windows
- **Likely cause:** لم تبدأ الخدمة الجديدة بشكل صحيح. يُحتفظ بالإصدار المعطوب باسم wantasticd.exe.failed.
- **Fix:** لا شيء عاجل؛ الإصدار السابق يعمل. إذا رأيت أيضًا "update-finish: previous binary did not start either"، فثبّت مجددًا باستخدام install.ps1 -Token.

### على Windows، لا يمكن حذف الخدمة.

```
[SC] DeleteService FAILED 1072: The specified service has been marked for deletion.
```

- **Where:** sc.exe
- **Likely cause:** لا يزال services.msc أو أداة أخرى يُبقي الخدمة مفتوحة.
- **Fix:** أغلق services.msc وEvent Viewer، أو أعد الإقلاع. ثم شغّل سطر إلغاء التثبيت مرة أخرى.

## Continue with

- [wantasticd CLI reference and operations](https://wantastic.app/ar/docs/wantasticd): The most used wantasticd commands first, then every command and flag, environment variables, config and state paths per OS, log lines, local access, exit node, and the claim flow (genkey / --wait-claim).
- [Choose your install method](https://wantastic.app/ar/docs/install-overview): Find your device in one table and copy one command. Most devices install in 2 minutes: install, scan a QR code, click Claim Device.
- [Update and rollback errors](https://wantastic.app/ar/docs/errors-update): Fix self-update failures, read the update log and roll back to the previous binary.
- [Install on Windows](https://wantastic.app/ar/docs/install-windows): Install wantasticd on Windows 10/11 and Windows Server: open PowerShell as Administrator, paste one line, approve the device in your browser.
- [Install on macOS](https://wantastic.app/ar/docs/install-macos): Install wantasticd on a Mac (Apple silicon or Intel) in 2 minutes: one Terminal command, scan a QR code, click Claim Device.
- [Install on Debian and Ubuntu](https://wantastic.app/ar/docs/install-debian-ubuntu): Install wantasticd on Debian, Ubuntu, Mint and Proxmox in 2 minutes: one command, scan a QR code, click Claim Device.
