#!/bin/sh # SPDX-License-Identifier: LGPL-3.0-only # SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® # # Removes what install.sh installed. Run as root. Every user's bank connections stay in /var/lib/nostro, for a later # install to find, unless --purge is given: then they go too, with the user nostro. Revoke the API keys in the bank's app # as well, since the bank still accepts them. set -u systemctl stop nostrod.service 2>/dev/null flatpak uninstall --system -y --noninteractive net.catcrafts.Nostrod 2>/dev/null # A nostrod installed before the Nostro app took its id, net.catcrafts.Nostro. The app itself stays: it is an app like # any other, removed with flatpak uninstall. if flatpak info --system --show-metadata net.catcrafts.Nostro 2>/dev/null | grep -qx 'command=nostro'; then flatpak uninstall --system -y --noninteractive net.catcrafts.Nostro 2>/dev/null fi flatpak remote-delete --system nostro-local 2>/dev/null rm -f /usr/share/dbus-1/system.d/net.catcrafts.Nostro1.conf \ /usr/share/dbus-1/system-services/net.catcrafts.Nostro1.service \ /usr/share/dbus-1/system-services/net.catcrafts.Nostro1.Checkout.service \ /usr/share/polkit-1/actions/net.catcrafts.Nostro1.policy \ /etc/systemd/system/nostrod.service \ /usr/local/bin/nostro systemctl daemon-reload busctl call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus ReloadConfig if [ "${1:-}" = --purge ]; then rm -rf /var/lib/nostro rm -f /usr/lib/sysusers.d/nostro.conf userdel nostro 2>/dev/null echo "nostro is removed, with every user's bank connections" else echo "nostro is removed; the bank connections stay in /var/lib/nostro (uninstall.sh --purge removes them)" fi