33

Hot on the heels of LCS (https://lemmy.world/post/557346), I bring you Lemmy Post Purger (LPP).

Instances can grow fast, and that can be a problem if you have limited disk space. If you don't mind losing history that your users have not interacted with, LPP can help. It will purge posts along with their comments and media before a certain time period if no comments, likes, or saves exist for users on your instance.

you are viewing a single comment's thread
view the rest of the comments
[-] netburnr@lemmy.world 1 points 3 years ago

Hey there @fmstrat@lemmy.nowsci.com does this script still work?

I did a fresh git clone today, and when I try to npm start I am getting:

lemmy-subscriber@1.0.0 start node index.js

undefined:1 undefined ^

SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse () at Object. (/root/lcs/src/index.js:8:30) at Module._compile (node:internal/modules/cjs/loader:1191:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10) at Module.load (node:internal/modules/cjs/loader:1069:32) at Function.Module._load (node:internal/modules/cjs/loader:904:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47

This is what I ran, I am using the Ansible install of the latest version of Lemmy.

cd src export LOCAL_URL=https://my.full.TLD export LOCAL_USERNAME=myadmin export LOCAL_PASSWORD=myadminpass export PURGE_OLDER_THAN_DAYS=14 export HOURS_BETWEEN_PURGES=4 export PG_HOST=172.18.0.3 #this is the local IP on my box that answers for the docker container that has postgres export PG_PORT=5432 export PG_USERNAME=lemmy export PG_PASSWORD=thelemmydb-password npm install npm start

[-] fmstrat@lemmy.nowsci.com 1 points 3 years ago

Hmm, I should probably check the issue tracker.. I haven't checked in a while, perhaps Lemmy has changed something.

[-] netburnr@lemmy.world 1 points 3 years ago

If there is anything I can do to help test, let me know. I just reinstalled my server because it had 100 percent filled up and manually deleting files was not releasing the disk space.

this post was submitted on 25 Jun 2023
33 points (97.1% liked)

Selfhosted

61995 readers
889 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS