diff --git a/stuffs/general.py b/stuffs/general.py
index 9c2c348..441da30 100644
--- a/stuffs/general.py
+++ b/stuffs/general.py
@@ -4,7 +4,7 @@ import re
 import zipfile
 import hashlib
 from tools import images
-from tools.helper import download_file, get_download_dir, run
+from tools.helper import download_file, get_download_dir, run, upgrade
 from tools.container import DBusContainerService
 from tools.logger import Logger
 
@@ -103,10 +103,12 @@ class General:
             DBusContainerService().Start(self.session)
         else:
             run(["systemctl", "restart", "waydroid-container.service"])
+        upgrade()
 
     def restart(self):
         self.stop()
         self.start()
+        upgrade()
 
     def copy(self):
         pass
diff --git a/tools/helper.py b/tools/helper.py
index a476284..649a7fe 100644
--- a/tools/helper.py
+++ b/tools/helper.py
@@ -1,5 +1,6 @@
 import os
 import platform
+import re
 import subprocess
 import sys
 import requests
@@ -17,16 +18,25 @@ def get_download_dir():
         os.makedirs(download_loc)
     return download_loc
 
-def run(args):
-    result = subprocess.run(args=args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+def run(args: list, env = None, ignore = None):
+    result = subprocess.run(
+        args=args, 
+        env=env, 
+        stdout=subprocess.PIPE, 
+        stderr=subprocess.PIPE
+    )
+
     # print(result.stdout.decode())
     if result.stderr:
-        Logger.error(result.stderr.decode("utf-8"))
+        error = result.stderr.decode("utf-8")
+        if ignore and re.match(ignore, error):
+            return result
+        Logger.error(error)
         raise subprocess.CalledProcessError(
-                    returncode = result.returncode,
-                    cmd = result.args,
-                    stderr = result.stderr
-                )
+            returncode=result.returncode,
+            cmd=result.args,
+            stderr=result.stderr
+        )
     return result
 
 def download_file(url, f_name):
@@ -72,3 +82,6 @@ def check_root():
     if os.geteuid() != 0:
         Logger.error("This script must be run as root. Aborting.")
         sys.exit(1)
+
+def upgrade():
+    run(["waydroid", "upgrade", "-o"], ignore=r"\[.*\] Stopping container\n\[.*\] Starting container")
\ No newline at end of file