How to Update Pi-hole

If you have followed our detailed article and completed the pi-hole setup on Raspberry Pi to block ads and trackers. Follow our tutorial and learn how to Update Pi-hole your Raspberry Pi if a few easy steps. If running as a headless server, you will need to SSH into your Raspberry Pi or access it directly via a keyboard and monitor.

Pi-hole Update Process

When you see there is a new version showing in the Pi-hole’s admin interface in the footer, the question comes to mind, how do I update Pi-hole? Steps carefully to update the pi-hole to the latest version.

1. SSH into Raspberry Pi

Assuming that how to login to your Raspberry Pi from any computer on your local network. With the IP address or hostname, you can ssh into your Pi. That’s done using this command from your other computer:

ssh pi@[address]

If your Raspberry Pi’s address is 192.168.0.200 , for example, it will look like this:

ssh [email protected]

2. Check the Pi-hole Version for Update

Now you will run a simple command to check the current Pi-hole version pihole -v you will see similar output as shown below.

[email protected]:~ $ pihole -v
  Pi-hole version is v4.4 (Latest: v5.1.2)
  AdminLTE version is v4.3.3 (Latest: v5.1.1)
  FTL version is v4.3.1 (Latest: v5.2)

3. Update Pi-hole

Updating Pi-hole is very easy, you don’t need to set up anything for the all you need is to enter the following command in the terminal.

[email protected]:~ $ 
pihole -up

You will see similar output as shown below.

Note if you are getting any kind of error run the command with sudo example: [email protected]:~ $
sudo pihole -up

[email protected]:~ $ pihole -up
[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
.;;,. .ccccc:,. :cccclll:. ..,, :ccccclll. ;ooodc 'ccll:;ll .oooodc .;cll.;;looo:. .. ','. .',,,,,,'. .',,,,,,,,,,. .',,,,,,,,,,,,.... ....''',,,,,,,'....... ......... .... ......... .......... .......... .......... .......... ......... .... ......... ........,,,,,,,'...... ....',,,,,,,,,,,,. .',,,,,,,,,'. .',,,,,,'. ..'''.
[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.14-1~deb10u1
[i] Performing unattended setup, no whiptail dialogs will be displayed
[✓] Disk space check
[✓] Checking apt-get for upgraded packages… 273 updates available
[i] It is recommended to update your OS after installing the Pi-hole!
[i] Installer Dependency checks…
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[✓] Checking for dnsutils
[✓] Supported OS detected
[i] SELinux not detected
[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 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 libcap2
[i] Checking for lighttpd (will be installed)
[✓] Checking for php7.3-common
[i] Checking for php7.3-cgi (will be installed)
[✓] Checking for php7.3-sqlite3
[✓] Checking for php7.3-xml
[✓] Checking for php7.3-intl
[i] Processing apt-get install(s) for: lighttpd php7.3-cgi, please wait…
Selecting previously unselected package libfam0:armhf.
(Reading database … 150676 files and directories currently installed.)
Preparing to unpack …/00-libfam0_2.7.0-17.3_armhf.deb …
Unpacking libfam0:armhf (2.7.0-17.3) …
Selecting previously unselected package lighttpd.
Preparing to unpack …/01-lighttpd_1.4.53-4_armhf.deb …
Unpacking lighttpd (1.4.53-4) …
Preparing to unpack …/02-php7.3-zip_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-zip (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/03-php7.3-xml_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-xml (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/04-php7.3-sqlite3_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-sqlite3 (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/05-php7.3-readline_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-readline (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/06-php7.3-opcache_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-opcache (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/07-php7.3-mysql_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-mysql (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/08-php7.3-mbstring_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-mbstring (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/09-php7.3-json_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-json (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/10-php7.3-intl_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-intl (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/11-php7.3-gd_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-gd (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/12-php7.3-fpm_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-fpm (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/13-php7.3-dev_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-dev (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/14-php7.3-curl_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-curl (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/15-php7.3-cli_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-cli (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/16-php7.3-common_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-common (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Selecting previously unselected package php7.3-cgi.
Preparing to unpack …/17-php7.3-cgi_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-cgi (7.3.19-1~deb10u1) …
Setting up php7.3-common (7.3.19-1~deb10u1) …
Setting up php7.3-mysql (7.3.19-1~deb10u1) …
Setting up php7.3-intl (7.3.19-1~deb10u1) …
Setting up php7.3-xml (7.3.19-1~deb10u1) …
Setting up libfam0:armhf (2.7.0-17.3) …
Setting up php7.3-opcache (7.3.19-1~deb10u1) …
Setting up php7.3-zip (7.3.19-1~deb10u1) …
Setting up php7.3-curl (7.3.19-1~deb10u1) …
Setting up php7.3-gd (7.3.19-1~deb10u1) …
Setting up lighttpd (1.4.53-4) …
Setting up php7.3-sqlite3 (7.3.19-1~deb10u1) …
Setting up php7.3-mbstring (7.3.19-1~deb10u1) …
Setting up php7.3-json (7.3.19-1~deb10u1) …
Setting up php7.3-readline (7.3.19-1~deb10u1) …
Setting up php7.3-cli (7.3.19-1~deb10u1) …
Replacing config file /etc/php/7.3/cli/php.ini with new version
Setting up php7.3-cgi (7.3.19-1~deb10u1) …
update-alternatives: using /usr/bin/php-cgi7.3 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php7.3 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode
Replacing config file /etc/php/7.3/cgi/php.ini with new version
Setting up php7.3-fpm (7.3.19-1~deb10u1) …
Setting up php7.3-dev (7.3.19-1~deb10u1) …
Processing triggers for systemd (241-7~deb10u4+rpi1) …
Processing triggers for man-db (2.8.5-2) …
Processing triggers for libc-bin (2.28-10+rpi1) …
[✓] Enabling lighttpd service to start on reboot…
[✓] Checking for user 'pihole'
[i] FTL Checks…
[✓] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary…
[✓] Downloading and Installing FTL
[✓] 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
[i] 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…
[i] Creating new gravity database
[i] Migrating content of /etc/pihole/adlists.list into new database
[i] Migrating content of /etc/pihole/blacklist.txt into new database
[i] Migrating content of /etc/pihole/whitelist.txt into new database
[i] Migrating content of /etc/pihole/regex.list into new database
[✓] Deleting existing list cache
[i] Neutrino emissions detected…
[✓] Pulling blocklist source list into range
[✓] Preparing new gravity database
[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[✓] Status: Retrieval successful
[i] Received 57260 domains
[i] Target: https://mirror1.malwaredomains.com/files/justdomains
[✓] Status: Retrieval successful
[i] Received 26854 domains
[i] Target: http://sysctl.org/cameleon/hosts
[✓] Status: Retrieval successful
[i] Received 20567 domains
[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
[✓] Status: Retrieval successful
[i] Received 34 domains
[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
[✓] Status: Retrieval successful
[i] Received 2701 domains
[i] Target: https://hosts-file.net/ad_servers.txt
[✗] Status: Not found
[✗] List download failed: no cached list available
[i] Target: https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt
[✓] Status: Retrieval successful
[i] Received 41581 domains
[✓] Storing downloaded domains in new gravity database
[✓] Building tree
[✓] Swapping databases
[i] Number of gravity domains: 148997 (132248 unique domains)
[i] Number of exact blacklisted domains: 2
[i] Number of regex blacklist filters: 0
[i] Number of exact whitelisted domains: 9
[i] Number of regex whitelist filters: 0
[✓] Flushing DNS cache
[✓] Cleaning up stray matter
[✓] 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 v5.1.2.
Current AdminLTE version is v5.1.1.
Current FTL version is v5.2.

Once the process is completed you will see Update Complete!, this is how you can update Pi-hole in 10 minutes.

How to Update Pi-hole

FAQ

Does Pi-hole need to be updated?

Sometimes it’s necessary to update the Pi-hole software because new releases are updated and bring the latest blocklist for trackers and malware.

What is the latest version of Pi-hole?

The latest version of the AdminLTE web interface for Pi-hole is v5.9.1.

How do you get into Pi-hole?

You can access the Pi-hole admin portal on your local network by typing http://pi.hole/admin from any web browser.

More from this stream

Recomended