Bitcoin Forum
June 23, 2026, 07:14:09 PM *
News: Latest Bitcoin Core release: 31.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to prune specific date range block data in bitcoincore  (Read 191 times)
Cypra (OP)
Jr. Member
*
Offline

Activity: 33
Merit: 17


View Profile
December 13, 2025, 06:42:59 PM
Merited by NotATether (8)
 #1

Running a Bitcoin core node I've learn about pruning system . Since I'm not using any external SSD and I do not have the enough space I learnt about Prune mode on bitcoincore node. But I've learnt that prune mode only keeps newly block storage data and replaced old data when new block data arrives.

Why it's not possible to prune block storage data in specific date range?
Let's say I need 2years worth back of block storage data, since I'm downloading the block storage why it's not possible to keep a specific time range block storage data on my Bitcoin core directory.
Could not find any way to make this happen.
Cookdata
Legendary
*
Offline

Activity: 1708
Merit: 1386


Not Your Keys, Not Your Bitcoin


View Profile
December 13, 2025, 09:21:16 PM
 #2

Why it's not possible to prune block storage data in specific date range?
Let's say I need 2years worth back of block storage data, since I'm downloading the block storage why it's not possible to keep a specific time range block storage data on my Bitcoin core directory.
Could not find any way to make this happen.

Pruning was never about specific date, it's about disk space you are willing to keep for blocks on your computer. If you are willing to make space of 2gb, put the number on your configuration, core will do the rest.

If you want to know blocks of specific date, you have to do the math's. Knows blocks produced each day and do the calculations.

You can play around with https://ycharts.com/indicators/bitcoin_blockchain_size It shows total blocks produce in GBs, saw an estimate of 705gb for yesterday update, that means today has not been updated till later time.

Just so you know, recent block years are heavy than the early blocks, you will need big space on your computer.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
nc50lc
Legendary
*
Offline

Activity: 3178
Merit: 8871


Self-proclaimed Genius


View Profile
December 14, 2025, 06:49:43 AM
Merited by Xal0lex (3), ABCbits (2), WhyFhy (1)
 #3

Why it's not possible to prune block storage data in specific date range?
Let's say I need 2years worth back of block storage data, since I'm downloading the block storage why it's not possible to keep a specific time range block storage data on my Bitcoin core directory.
Could not find any way to make this happen.
Since you asked why, I'll answer with: because it's not yet implemented to prune option or as a new "prune by timestamp" option.
But it's not impossible to implement if it's necessary.

For the current version of the reference client, the closest feature that you can utilize is "manual pruning".
Setting "prune=1" in your config or adding --prune as a command line arg will enable that.
With that enabled, you can use pruneblockchain command which supports epoch timestamp as arg. (set it to a date 2 years ago)
But you'll have to do it periodically since it's manual.

Here's the documentation of that command: bitcoincore.org/en/doc/30.0.0/rpc/blockchain/pruneblockchain

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
ABCbits
Legendary
*
Offline

Activity: 3640
Merit: 10146



View Profile
December 14, 2025, 07:58:47 AM
 #4

For the current version of the reference client, the closest feature that you can utilize is "manual pruning".
Setting "prune=1" in your config or adding --prune as a command line arg will enable that.
With that enabled, you can use pruneblockchain command which supports epoch timestamp as arg. (set it to a date 2 years ago)
But you'll have to do it periodically since it's manual.

Here's the documentation of that command: bitcoincore.org/en/doc/30.0.0/rpc/blockchain/pruneblockchain

Good idea. If it's combined with bash script and system service, the prune process also can be automated. Just make sure date and time on your system is properly synced.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
LoyceV
Legendary
*
Offline

Activity: 4074
Merit: 22133


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
December 19, 2025, 04:06:37 PM
 #5

Let's say I need 2years worth back of block storage data
Maybe Bitcoin block data (1013 GB): inputs, outputs and transactions has what you're looking for.

Quote
since I'm downloading the block storage why it's not possible to keep a specific time range block storage data on my Bitcoin core directory.
You could prune Bitcoin Core to 200 GB, and take it offline after it reaches the year you need.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!