Skip to content

Instantly share code, notes, and snippets.

@popjdh
Forked from nakamuraos/reset-trial-navicat.sh
Created December 7, 2025 09:21
Show Gist options
  • Select an option

  • Save popjdh/8d6378c61399949d972ee82f136737ab to your computer and use it in GitHub Desktop.

Select an option

Save popjdh/8d6378c61399949d972ee82f136737ab to your computer and use it in GitHub Desktop.

Revisions

  1. @nakamuraos nakamuraos revised this gist Sep 23, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ 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
    if [[ ! "${1:-}" =~ ^--?[Yy]([eE][sS])?$ ]]; then
    read -p "Are you sure? (y/N) " -r
    echo
    if [[ ! $REPLY =~ ^[Yy]([eE][sS])?$ ]]; then
  2. @nakamuraos nakamuraos revised this gist Sep 23, 2025. 1 changed file with 30 additions and 11 deletions.
    41 changes: 30 additions & 11 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ set -euo pipefail

    # Author: NakamuraOS <https://github.com/nakamuraos>
    # Latest update: 03/19/2025
    # Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.
    # Tested with Navicat 15.x, 16.x, and 17.x on Debian and Ubuntu.

    BGRED="\e[1;97;41m"
    ENDCOLOR="\e[0m"
    @@ -21,23 +21,42 @@ echo -e "Report issues:\n> https://gist.github.com/nakamuraos/717eb99b5e145ed11c
    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
    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..."
    cp ~/.config/dconf/user ~/.config/dconf/user.$DATE.bk
    echo "The user dconf backup was created at $HOME/.config/dconf/user.$DATE.bk"
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.$DATE.bk
    echo "The Navicat preferences backup was created at $HOME/.config/navicat/Premium/preferences.json.$DATE.bk"
    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..."
  3. @nakamuraos nakamuraos revised this gist Sep 23, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    #!/bin/bash
    set -euo pipefail

    # Author: NakamuraOS <https://github.com/nakamuraos>
    # Latest update: 03/19/2025
  4. @nakamuraos nakamuraos revised this gist Mar 19, 2025. No changes.
  5. @nakamuraos nakamuraos revised this gist Mar 19, 2025. 1 changed file with 33 additions and 24 deletions.
    57 changes: 33 additions & 24 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash

    # Author: NakamuraOS <https://github.com/nakamuraos>
    # Latest update: 06/24/2024
    # Latest update: 03/19/2025
    # Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.

    BGRED="\e[1;97;41m"
    @@ -18,27 +18,36 @@ 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:"
    read -p "Are you sure? (y/N) " -r
    echo
    if [[ $REPLY =~ ^[Yy]([eE][sS])?$ ]]
    then
    echo "Starting reset..."
    DATE=$(date '+%Y%m%d_%H%M%S')
    # Backup
    echo "=> Creating a backup..."
    cp ~/.config/dconf/user ~/.config/dconf/user.$DATE.bk
    echo "The user dconf backup was created at $HOME/.config/dconf/user.$DATE.bk"
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.$DATE.bk
    echo "The Navicat preferences backup was created at $HOME/.config/navicat/Premium/preferences.json.$DATE.bk"
    # 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."
    else
    echo "Aborted."

    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..."
    cp ~/.config/dconf/user ~/.config/dconf/user.$DATE.bk
    echo "The user dconf backup was created at $HOME/.config/dconf/user.$DATE.bk"
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.$DATE.bk
    echo "The Navicat preferences backup was created at $HOME/.config/navicat/Premium/preferences.json.$DATE.bk"

    # 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
  6. @nakamuraos nakamuraos revised this gist Jun 25, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ echo -e "${BGRED} ${ENDCOLOR}"
    echo -e "${BGRED} ┌──────────────────────────────────────┐ ${ENDCOLOR}"
    echo -e "${BGRED} │ !!! WARNING !!! │ ${ENDCOLOR}"
    echo -e "${BGRED} ├──────────────────────────────────────┤ ${ENDCOLOR}"
    echo -e "${BGRED} │ ALL DATA may be destroyed. │ ${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}"
  7. @nakamuraos nakamuraos revised this gist Jun 25, 2024. 1 changed file with 21 additions and 14 deletions.
    35 changes: 21 additions & 14 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -4,32 +4,39 @@
    # Latest update: 06/24/2024
    # Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.

    RED="\e[1;97;41m"
    BGRED="\e[1;97;41m"
    ENDCOLOR="\e[0m"

    echo -e "${RED} ${ENDCOLOR}"
    echo -e "${RED} ┌──────────────────────────────────────┐ ${ENDCOLOR}"
    echo -e "${RED} │ !!! WARNING !!! │ ${ENDCOLOR}"
    echo -e "${RED} ├──────────────────────────────────────┤ ${ENDCOLOR}"
    echo -e "${RED} │ ALL DATA may be destroyed. │ ${ENDCOLOR}"
    echo -e "${RED} │ Always BACKUP before continuing. │ ${ENDCOLOR}"
    echo -e "${RED} └──────────────────────────────────────┘ ${ENDCOLOR}"
    echo -e "${RED} ${ENDCOLOR}"
    echo -e "${BGRED} ${ENDCOLOR}"
    echo -e "${BGRED} ┌──────────────────────────────────────┐ ${ENDCOLOR}"
    echo -e "${BGRED} │ !!! WARNING !!! │ ${ENDCOLOR}"
    echo -e "${BGRED} ├──────────────────────────────────────┤ ${ENDCOLOR}"
    echo -e "${BGRED} │ ALL DATA may 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:"
    read -p "Are you sure? (Y/n) " -r
    read -p "Are you sure? (y/N) " -r
    echo
    if [[ $REPLY =~ ^[Yy]([eE][sS])?$ ]]
    then
    echo "Cleaning..."
    echo "Starting reset..."
    DATE=$(date '+%Y%m%d_%H%M%S')
    # Backup
    cp ~/.config/dconf/user ~/.config/dconf/user.$(date '+%Y%m%d_%H%M%S').bk
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.$(date '+%Y%m%d_%H%M%S').bk
    echo "=> Creating a backup..."
    cp ~/.config/dconf/user ~/.config/dconf/user.$DATE.bk
    echo "The user dconf backup was created at $HOME/.config/dconf/user.$DATE.bk"
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.$DATE.bk
    echo "The Navicat preferences backup was created at $HOME/.config/navicat/Premium/preferences.json.$DATE.bk"
    # 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-Z0-9]+)":\{([^\}]+)},?//g' ~/.config/navicat/Premium/preferences.json
    sed -i -E 's/,?"([A-F0-9]+)":\{([^\}]+)},?//g' ~/.config/navicat/Premium/preferences.json
    echo "The Navicat preferences was reset"
    # Done
    echo "Done."
    else
  8. @nakamuraos nakamuraos revised this gist Jun 24, 2024. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -1,31 +1,31 @@
    #!/bin/bash

    # Author: NakamuraOS
    # https://github.com/nakamuraos
    # Latest update: 30/03/2022
    # Tested on Navicat 15.x, 16.x on Linux
    # Author: NakamuraOS <https://github.com/nakamuraos>
    # Latest update: 06/24/2024
    # Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.

    RED="\e[1;31m"
    RED="\e[1;97;41m"
    ENDCOLOR="\e[0m"

    echo -e "${RED}"
    echo -e "======================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "======================================="
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "======================================="
    echo -e "${ENDCOLOR}"
    echo -e "${RED} ${ENDCOLOR}"
    echo -e "${RED} ┌──────────────────────────────────────┐ ${ENDCOLOR}"
    echo -e "${RED} !!! WARNING !!! ${ENDCOLOR}"
    echo -e "${RED} ├──────────────────────────────────────┤ ${ENDCOLOR}"
    echo -e "${RED} ALL DATA may be destroyed. ${ENDCOLOR}"
    echo -e "${RED}Always BACKUP before continuing. ${ENDCOLOR}"
    echo -e "${RED} └──────────────────────────────────────┘ ${ENDCOLOR}"
    echo -e "${RED} ${ENDCOLOR}"

    echo "Reset trial & clear all data settings."
    read -p "Are you sure? (Y/n) " -n 1 -r
    echo -e "Report issues:\n> https://gist.github.com/nakamuraos/717eb99b5e145ed11cd754ad3714b302\n"
    echo -e "Reset trial \e[1mNavicat Premium\e[0m:"
    read -p "Are you sure? (Y/n) " -r
    echo
    if [[ $REPLY =~ ^[Yy]$ ]]
    if [[ $REPLY =~ ^[Yy]([eE][sS])?$ ]]
    then
    echo "Cleaning..."
    # Backup
    cp ~/.config/dconf/user ~/.config/dconf/user.bk
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.bk
    cp ~/.config/dconf/user ~/.config/dconf/user.$(date '+%Y%m%d_%H%M%S').bk
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.$(date '+%Y%m%d_%H%M%S').bk
    # Clear data in dconf
    dconf reset -f /com/premiumsoft/navicat-premium/
    # Remove data fields in config file
  9. @nakamuraos nakamuraos revised this gist Mar 30, 2022. 1 changed file with 9 additions and 4 deletions.
    13 changes: 9 additions & 4 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # Author: NakamuraOS
    # https://github.com/nakamuraos
    # Latest update: 21/03/2022
    # Latest update: 30/03/2022
    # Tested on Navicat 15.x, 16.x on Linux

    RED="\e[1;31m"
    @@ -14,7 +14,6 @@ echo -e "| !!! WARNING !!! |"
    echo -e "======================================="
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "| Note: Virtual Grouping will be lost |"
    echo -e "======================================="
    echo -e "${ENDCOLOR}"

    @@ -24,8 +23,14 @@ echo
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    echo "Cleaning..."
    rm -rf ~/.config/dconf/user
    rm -rf ~/.config/navicat/Premium
    # Backup
    cp ~/.config/dconf/user ~/.config/dconf/user.bk
    cp ~/.config/navicat/Premium/preferences.json ~/.config/navicat/Premium/preferences.json.bk
    # Clear data in dconf
    dconf reset -f /com/premiumsoft/navicat-premium/
    # Remove data fields in config file
    sed -i -E 's/,?"([A-Z0-9]+)":\{([^\}]+)},?//g' ~/.config/navicat/Premium/preferences.json
    # Done
    echo "Done."
    else
    echo "Aborted."
  10. @nakamuraos nakamuraos revised this gist Mar 21, 2022. No changes.
  11. @nakamuraos nakamuraos revised this gist Mar 21, 2022. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,13 @@ RED="\e[1;31m"
    ENDCOLOR="\e[0m"

    echo -e "${RED}"
    echo -e "===================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "===================================="
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "| Note: Virtual Grouping will lost |"
    echo -e "===================================="
    echo -e "======================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "======================================="
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "| Note: Virtual Grouping will be lost |"
    echo -e "======================================="
    echo -e "${ENDCOLOR}"

    echo "Reset trial & clear all data settings."
  12. @nakamuraos nakamuraos revised this gist Mar 21, 2022. 1 changed file with 9 additions and 8 deletions.
    17 changes: 9 additions & 8 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -2,19 +2,20 @@

    # Author: NakamuraOS
    # https://github.com/nakamuraos
    # Date: 04/12/2021
    # Tested on Navicat 15.x on Linux
    # Latest update: 21/03/2022
    # Tested on Navicat 15.x, 16.x on Linux

    RED="\e[1;31m"
    ENDCOLOR="\e[0m"

    echo -e "${RED}"
    echo -e "=================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "=================================="
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "=================================="
    echo -e "===================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "===================================="
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "| Note: Virtual Grouping will lost |"
    echo -e "===================================="
    echo -e "${ENDCOLOR}"

    echo "Reset trial & clear all data settings."
  13. @nakamuraos nakamuraos revised this gist Jan 4, 2022. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -23,11 +23,7 @@ echo
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    echo "Cleaning..."
    # Comment this lines because this is old method
    # (All data will be lost)
    # rm -rf ~/.config/dconf/user
    # rm -rf ~/.config/navicat
    # New method: Only data settings will be lost
    rm -rf ~/.config/dconf/user
    rm -rf ~/.config/navicat/Premium
    echo "Done."
    else
  14. @nakamuraos nakamuraos revised this gist Dec 4, 2021. 1 changed file with 9 additions and 4 deletions.
    13 changes: 9 additions & 4 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # Author: NakamuraOS
    # https://github.com/nakamuraos
    # Date: 22/11/2021
    # Date: 04/12/2021
    # Tested on Navicat 15.x on Linux

    RED="\e[1;31m"
    @@ -12,18 +12,23 @@ echo -e "${RED}"
    echo -e "=================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "=================================="
    echo -e "| All data will destroy. |"
    echo -e "| All data can be destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "=================================="
    echo -e "${ENDCOLOR}"

    echo "Reset trial & clear all data."
    echo "Reset trial & clear all data settings."
    read -p "Are you sure? (Y/n) " -n 1 -r
    echo
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    echo "Cleaning..."
    rm -rf ~/.config/dconf/user ~/.config/navicat
    # Comment this lines because this is old method
    # (All data will be lost)
    # rm -rf ~/.config/dconf/user
    # rm -rf ~/.config/navicat
    # New method: Only data settings will be lost
    rm -rf ~/.config/navicat/Premium
    echo "Done."
    else
    echo "Aborted."
  15. @nakamuraos nakamuraos created this gist Nov 22, 2021.
    30 changes: 30 additions & 0 deletions reset-trial-navicat.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    #!/bin/bash

    # Author: NakamuraOS
    # https://github.com/nakamuraos
    # Date: 22/11/2021
    # Tested on Navicat 15.x on Linux

    RED="\e[1;31m"
    ENDCOLOR="\e[0m"

    echo -e "${RED}"
    echo -e "=================================="
    echo -e "| !!! WARNING !!! |"
    echo -e "=================================="
    echo -e "| All data will destroy. |"
    echo -e "| Always backup before continue. |"
    echo -e "=================================="
    echo -e "${ENDCOLOR}"

    echo "Reset trial & clear all data."
    read -p "Are you sure? (Y/n) " -n 1 -r
    echo
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    echo "Cleaning..."
    rm -rf ~/.config/dconf/user ~/.config/navicat
    echo "Done."
    else
    echo "Aborted."
    fi