I installed an OpenVPN server with Pi-hole software to block block ads, reduced my 4G/3G/LTE traffic on the same Debian or Ubuntu Linux server. How do I upgrade my Pi-hole to the latest version using command line?

Updating Pi-hole is very easy. First you must update your operating system. The commands are as follows:
Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Pihole on Debian/Ubuntu or CentOS Linux
Est. reading time 5 minutes

Update Debian/Ubuntu Linux server and OpenVPN

Type the following apt-get command or apt command as follows to apply patches including OpenVPN software:
$ sudo apt-get update
$ sudo apt-get upgrade
## reboot the server if a new kernel was installed on your server ##
$ sudo reboot

How to update/upgrade Pi-hole with an OpenVPN on Ubuntu/Debian Linux

The pihole command act as a black-hole for internet advertisements and tool to manage various options. Let us see how to update Pi-hole subsystems using the CLI. To check for updates run:
pihole version
Sample outputs:

  Pi-hole version is v4.3.2 (Latest: v4.4)
  AdminLTE version is v4.3.2 (Latest: v4.3.3)
  FTL version is v4.3.1 (Latest: v4.3.1)

How do I update my Pi-hole?

Type the following command:
$ pihole -up
$ pihole updatePihole
Sample outputs:

  [i] Checking for updates...
  [i] Pi-hole Core:	update available
  [i] Web Interface:	update available
  [i] FTL:		update available

  [i] Pi-hole core files out of date, updating local repo.
  [?] Check for existing repository in /etc/.pihole
  [?] Update repo in /etc/.pihole

  [i] If you had made any changes in '/etc/.pihole/', they have been stashed using 'git stash'

  [i] Pi-hole Web Admin files out of date, updating local repo.
  [?] Check for existing repository in /var/www/html/admin
  [?] Update repo in /var/www/html/admin

  [i] If you had made any changes in '/var/www/html/admin/', they have been stashed using 'git stash'

  [i] FTL out of date, it will be updated by the installer.

  [?] Root user check

         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
                 .. ','.
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........

  [i] Existing PHP installation detected : PHP version 7.2.24-0ubuntu0.18.04.3
  [i] Performing unattended setup, no whiptail dialogs will be displayed
  [?] Disk space check
  [?] Update local cache of available packages

  [?] Checking apt-get for upgraded packages... up to date!

  [i] Installer Dependency checks...
  [?] Checking for apt-utils
  [?] Checking for dialog
  [?] Checking for debconf
  [?] Checking for dhcpcd5
  [?] Checking for git
  [?] Checking for iproute2
  [?] Checking for whiptail

  [i] Performing reconfiguration, skipping download of local repos
  [?] Resetting repository within /etc/.pihole...
  [?] Resetting repository within /var/www/html/admin...
  [i] Main Dependency checks...
  [?] Checking for cron
  [?] Checking for curl
  [?] Checking for dnsutils
  [?] Checking for iputils-ping
  [?] Checking for lsof
  [?] Checking for netcat
  [?] Checking for psmisc
  [?] Checking for sudo
  [?] Checking for unzip
  [?] Checking for wget
  [?] Checking for idn2
  [?] Checking for sqlite3
  [?] Checking for libcap2-bin
  [?] Checking for dns-root-data
  [?] Checking for resolvconf
  [?] Checking for libcap2
  [?] Checking for lighttpd
  [?] Checking for php7.2-common
  [?] Checking for php7.2-cgi
  [?] Checking for php7.2-sqlite3

  [?] Enabling lighttpd service to start on reboot...
  [?] Checking for user 'pihole'

  [i] FTL Checks...

  [?] Detected x86_64 architecture
  [i] Checking for existing FTL binary...
  [i] Latest FTL Binary already installed (v4.3.1). Confirming Checksum...
  [i] Checksum correct. No need to download!
  [?] Checking for user 'pihole'
  [?] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [?] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

  [i] Installing blocking page...
  [?] Creating directory for blocking page, and copying files
  [?] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up

  [?] Installing sudoer file

  [?] Installing latest Cron script

  [?] Installing latest logrotate script
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
  [?] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [?] Restarting lighttpd service...
  [?] Enabling lighttpd service to start on reboot...
  [i] Restarting services...
  [?] Enabling pihole-FTL service to start on reboot...
  [?] Restarting pihole-FTL service...
  [?] Deleting existing list cache
  [i] Pi-hole blocking is enabled
  [i] Neutrino emissions detected...
  [?] Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [?] Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [?] Status: Retrieval successful

  [i] Target: sysctl.org (hosts)
  [?] Status: Retrieval successful

  [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
  [?] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [?] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [?] Status: Retrieval successful

  [i] Target: hosts-file.net (ad_servers.txt)
  [?] Status: Retrieval successful

  [?] Consolidating blocklists
  [?] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 147565
  [?] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 125233
  [i] Nothing to whitelist!
  [i] Number of regex filters: 0
  [?] Parsing domains into hosts format
  [?] Cleaning up stray matter

  [?] Force-reloading DNS service
  [?] DNS service is running
  [?] Pi-hole blocking is Enabled

  [i] The install log is located at: /etc/pihole/install.log
Update Complete! 

  Current Pi-hole version is v4.4
  Current AdminLTE version is v4.3.3
  Current FTL version is v4.3.1

Test it

Visit admin url such as, and you should see an updated pi-hole screen and version info at the bottom of page as follows:

Pi-hole Version v4.4 Web Interface Version v4.3.3 FTL Version v4.3.1

Sample outputs:

You can run the following command to see version info too:
$ pihole -v
Sample outputs:

  Pi-hole version is v4.4 (Latest: v4.4)
  AdminLTE version is v4.3.3 (Latest: v4.3.3)
  FTL version is v4.3.1 (Latest: v4.3.1)

How to check pi-hole for updates

Run the following command:
$ pihole updatePihole --check-only

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 5 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
5 comments… add one
  • James May 2, 2017 @ 19:29

    Please check out sabproxy . com. It does the same thing and its just easy as running a jar file….

  • Robi Erwin Setiawan Jul 22, 2020 @ 4:13

    Hi, I would like to ask about how to update the openvpn?

    • 🐧 Vivek Gite Jul 22, 2020 @ 7:42


      You run package manager command such as
      sudo apt-get update
      sudo apt-get upgrade

      This will update openvpn if update released.

      • Robi Erwin Setiawan Dec 22, 2020 @ 23:44

        Thank you Vivek, I really appreciate you taking time to reply my question

  • Helle Irene Mar 29, 2021 @ 6:40

    I was getting this when I ran pihole updatePihole

      [] Retrieval of supported OS list failed. dig failed with return code 9. 
          Unable to determine if the detected OS (Debian 10) is supported
          Possible causes for this include:
            - Firewall blocking certain DNS lookups from Pi-hole device
            - ns1.pi-hole.net being blocked (required to obtain TXT record from versions.pi-hole.net containing supported operating systems)
            - Other internet connectivity issues

    So I did:

    sudo -i
    export PIHOLE_SKIP_OS_CHECK=true
    pihole updatePihole

    Tested on my Debian 10 Linux and OpenVPN server running on Linode cloud.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum