# Blocklist Management in PiHole v5

**URL:** https://discourse.pi-hole.net/t/blocklist-management-in-pihole-v5/31971
**Category:** Customizing Pi-hole
**Created:** [May 11, 2020, 1:52pm UTC](https://discourse.pi-hole.net/t/blocklist-management-in-pihole-v5/31971 "2020-05-11T13:52:07Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)
#### Post date: [May 11, 2020, 5:04pm UTC](https://discourse.pi-hole.net/t/blocklist-management-in-pihole-v5/31971/7 "2020-05-11T17:04:43Z")

</div>

As far as I know, you can't specify the id field, the id field is the primary key and autogenerated by sqlite3, it will increment automatically, when a new entry is inserted.

I don't see what your trying to achieve with the or (||) function in the read statement, read the list from file, keep it simple.  
I don't have a clue if you can redirect from url, wget the file from the remote host and  
test if the file has content, using something like:

```auto
wget http://domain.com/ListOfLists.txt - O /home/pi/ListOfLists.txt
if [! -s /home/pi/ListOfLists.txt]; then
	exit
fi

```

The example I provided works (has been since the beginning of beta5).

If you want to empty the table (to remove lists that are no longer exist in the export), look at [this](https://www.tutorialspoint.com/sqlite/sqlite_truncate_table.htm) ( **NOT TESTED -use at your own risk** ).

---

_[View the full topic](https://discourse.pi-hole.net/t/blocklist-management-in-pihole-v5/31971)._
