final protected function removeAppProcess()
    {
        $appname = $this->params['appname'];
        Output::displayAsGreen("Processing to delete app : $appname \n", "none", false);
        sleep(1);

        // DELETE TO APP CORE

        $file = json_decode(file_get_contents(FEnvFcm::get("framework.config.core.apps.file")));
        if (!empty($file)) {
            foreach ($file as $one => $val) {
                if ($val->name == $appname) {
                    unset($file->$one);
                    break;
                }
            }

            $file = array_values((array)$file);
            $filetemp = $file;
            $file = json_encode((object) $file, JSON_PRETTY_PRINT);

            file_put_contents(FEnvFcm::get("framework.config.core.apps.file"), $file);
            if (strlen($file) < 3) {
                file_put_contents(FEnvFcm::get("framework.config.core.apps.file"), "");
            }
        }

        $asm = new AssetsManager();
        $asm->__render(["commands" => ["assets:clear"],
            "options" => ["--quiet", "--noexit", "--appname=". $this->params['appname']]]);
        // $this->removeComposerApp($appname);
        Server::delete(FEnvFcm::get("framework.apps")."$appname", "directory");
        if (empty($filetemp)) {
            $base = __DIR__."/../../../../../../";
            $elem = json_decode(file_get_contents($base."elements/config_files/core/framework.config.json"));
            $elem->installation = null;
            $elem->deployment = null;
            file_put_contents($base."elements/config_files/core/framework.config.json", json_encode($elem));
        }
        Output::displayAsGreen("The application has been deleted. To create a new application,
         use [app create] .", "none", false);
    }