# Unable to delete expired piece info from DB

**URL:** <https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463>\
**Category:** troubleshooting\
**Tags:** docker, database\
**Created:** [April 27, 2023, 5:25am UTC](https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463 "2023-04-27T05:25:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [April 27, 2023, 5:25am UTC](https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463/1 "2023-04-27T05:25:46Z")

</div>

I started a node and in the logs I saw that message on startup: `unable to delete expired piece info from DB`.  
So I stopped it and recreated databases and replaced the old `piece_expiration.db` with the freshly created one.  
But something went wrong and node would not start with that database. The logs showed that it tried to alter the database (add trash column?) and failed.

So I am wondering why the fresh database would not work.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [April 27, 2023, 7:39am UTC](https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463/2 "2023-04-27T07:39:16Z")

</div>

Perhaps it’s failed on the next database?  
Could you post an error?

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [April 27, 2023, 8:03am UTC](https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463/3 "2023-04-27T08:03:25Z")

</div>

Weird…

I have just performed the same steps that I did yesterday.

```auto
unable to delete expired piece info from DB 
"error": "pieces error: database disk image is malformed", "errorVerbose": "pieces error: database disk image is malformed

```

```auto
INFO db.migration.26 Add Trash column to pieceExpirationDB {"Process": "storagenode"}

```

Replaced the database with the fresh one and this time no error… Node is starting up and running. 🤔

I think this issue can be closed for now.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [April 28, 2023, 7:35am UTC](https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463/4 "2023-04-28T07:35:12Z")

</div>

You need to check all databases, perhaps it complains on another one (I do not see a name in the error message).

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [April 28, 2023, 7:37am UTC](https://forum.storj.io/t/unable-to-delete-expired-piece-info-from-db/22463/5 "2023-04-28T07:37:12Z")

</div>

There is no more complaint about other databases currently. So I think it is fine.
