Skip to content

Instantly share code, notes, and snippets.

@nakamuraos
Last active February 13, 2026 10:15
Show Gist options
  • Select an option

  • Save nakamuraos/717eb99b5e145ed11cd754ad3714b302 to your computer and use it in GitHub Desktop.

Select an option

Save nakamuraos/717eb99b5e145ed11cd754ad3714b302 to your computer and use it in GitHub Desktop.
Reset trial Navicat 15, Navicat 16, Navicat 17 on Linux
#!/bin/bash
set -euo pipefail
# Author: NakamuraOS <https://github.com/nakamuraos>
# Latest update: 03/19/2025
# Tested with Navicat 15.x, 16.x, and 17.x on Debian and Ubuntu.
BGRED="\e[1;97;41m"
ENDCOLOR="\e[0m"
echo -e "${BGRED} ${ENDCOLOR}"
echo -e "${BGRED} ┌──────────────────────────────────────┐ ${ENDCOLOR}"
echo -e "${BGRED} │ !!! WARNING !!! │ ${ENDCOLOR}"
echo -e "${BGRED} ├──────────────────────────────────────┤ ${ENDCOLOR}"
echo -e "${BGRED} │ ALL DATA can be destroyed. │ ${ENDCOLOR}"
echo -e "${BGRED} │ Always BACKUP before continuing. │ ${ENDCOLOR}"
echo -e "${BGRED} └──────────────────────────────────────┘ ${ENDCOLOR}"
echo -e "${BGRED} ${ENDCOLOR}"
echo -e "Report issues:\n> https://gist.github.com/nakamuraos/717eb99b5e145ed11cd754ad3714b302\n"
echo -e "Reset trial \e[1mNavicat Premium\e[0m:"
if [[ ! "${1:-}" =~ ^--?[Yy]([eE][sS])?$ ]]; then
read -p "Are you sure? (y/N) " -r
echo
if [[ ! $REPLY =~ ^[Yy]([eE][sS])?$ ]]; then
echo "Aborted."
exit 0
fi
fi
echo "Starting reset..."
DATE=$(date '+%Y%m%d_%H%M%S')
# Backup
echo "=> Creating a backup..."
mkdir -p ~/.config/dconf/user-backup ~/.config/navicat/Premium/preferences-backup
cp ~/.config/dconf/user ~/.config/dconf/user-backup/user.$DATE
echo "The user dconf backup was created at $HOME/.config/dconf/user-backup/user.$DATE"
cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences-backup/preferences.json.$DATE
echo "The Navicat preferences backup was created at $HOME/.config/navicat/Premium/preferences-backup/preferences.json.$DATE"
if ! command -v dconf &>/dev/null; then
echo "=> dconf is not installed. Installing..."
if command -v apt-get &>/dev/null; then
sudo apt-get update
sudo apt-get install -y dconf-cli
elif command -v dnf &>/dev/null; then
sudo dnf install -y dconf
elif command -v yum &>/dev/null; then
sudo yum install -y dconf
elif command -v pacman &>/dev/null; then
sudo pacman -Sy --noconfirm dconf
else
echo "Package manager not supported. Please install dconf manually."
exit 1
fi
fi
# Clear data in dconf
echo "=> Resetting..."
dconf reset -f /com/premiumsoft/navicat-premium/
echo "The user dconf data was reset"
# Remove data fields in config file
sed -i -E 's/,?"([A-F0-9]+)":\{([^\}]+)},?//g' ~/.config/navicat/Premium/preferences.json
echo "The Navicat preferences was reset"
# Done
echo "Done."
exit 0
@metka495
Copy link

╭─ ~/sh ──────────────────────────────────────────────── ✔ at 16:40:27 ─╮
╰─ ./reset-trial-navicat.sh -y ─╯

┌──────────────────────────────────────┐
│ !!! WARNING !!! │
├──────────────────────────────────────┤
│ ALL DATA can be destroyed. │
│ Always BACKUP before continuing. │
└──────────────────────────────────────┘

Report issues:

https://gist.github.com/nakamuraos/717eb99b5e145ed11cd754ad3714b302

Reset trial Navicat Premium:
Starting reset...
=> Creating a backup...
The user dconf backup was created at /home/mezz/.config/dconf/user-backup/user.20260211_164028
The Navicat preferences backup was created at /home/mezz/.config/navicat/Premium/preferences-backup/preferences.json.20260211_164028
=> Resetting...
The user dconf data was reset
The Navicat preferences was reset
Done.

但是依旧没有生效 我的 navicat 已经完全退出了 17.3.7版本

@nakamuraos
Copy link
Author

但是依旧没有生效 我的 navicat 已经完全退出了 17.3.7版本
Tested 17.3.7 and it still works

@metka495
Copy link

╭─ ~/sh ──────────────────────────────────────────────── ✔ at 16:40:27 ─╮ ╰─ ./reset-trial-navicat.sh -y ─╯

┌──────────────────────────────────────┐ │ !!! WARNING !!! │ ├──────────────────────────────────────┤ │ ALL DATA can be destroyed. │ │ Always BACKUP before continuing. │ └──────────────────────────────────────┘

Report issues:

https://gist.github.com/nakamuraos/717eb99b5e145ed11cd754ad3714b302

Reset trial Navicat Premium: Starting reset... => Creating a backup... The user dconf backup was created at /home/mezz/.config/dconf/user-backup/user.20260211_164028 The Navicat preferences backup was created at /home/mezz/.config/navicat/Premium/preferences-backup/preferences.json.20260211_164028 => Resetting... The user dconf data was reset The Navicat preferences was reset Done.

但是依旧没有生效 我的 navicat 已经完全退出了 17.3.7版本
I thought this cracked script was actually indefinitely renewable, but I tested it today and it was indeed successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment