Skip to main content

lemmy-image-purge

A simple utility that aims to purge the content of a community from a lemmy instnace, specifically covering purging data from pictrs and the lemmy database.

Usage

Run via Docker

Subtitute the values below with ones for your own instance

docker run -it --rm \
    --network="lemmy" \
    -e DATABASE_URL="postgresql://postgres@localhost:5432/lemmy" \
    -e PICTRS_URL="http://pictrs/" \
    -e PICTRS_API_KEY="aaaabbbbccccc1111222333" \
    ghcr.io/devops-pizza/lemmy-image-purge:latest \
    purge --community "https://lemmy.world/c/lemmyshitpost" --domain "devops.pizza" --days 7

Run via pipx

pipx install lemmy-image-purge
export DATABASE_URL="postgresql://postgres@localhost:5432/lemmy"
export PICTRS_URL="http://pictrs/"
export PICTRS_API_KEY="aaaabbbbccccc1111222333"
lemmy-image-purge purge --community "https://lemmy.world/c/lemmyshitpost" --domain "devops.pizza" --days 7

Run via Kubernetes

cat <EOF > job.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: lemmy-image-purge
  namespace: lemmy
spec:
  template:
    spec:
      containers:
      - name: app
        image: ghcr.io/devops-pizza/lemmy-image-purge:latest
        env:
        - name: DATABASE_URL
          value: postgresql://postgres@localhost:5432/lemmy
        - name: PICTRS_URL
          value: http://pictrs/
        - name: PICTRS_API_KEY
          value: aaaabbbbccccc1111222333
        args: ["purge", "--community", "https://lemmy.world/c/lemmyshitpost", "--domain", "devops.pizza", "--days", "7"]
      restartPolicy: Never
  backoffLimit: 0
EOF

Metadata

Release files for lemmy-image-purge 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lemmy-image-purge 1.0.0
File Size Uploaded
lemmy_image_purge-1.0.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lemmy-image-purge 1.0.0
File Interpreter ABI Platform
lemmy_image_purge-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / lemmy_image_purge-1.0.0.tar.gz

Download URL lemmy_image_purge-1.0.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2fb35f69961ef990ddfd050d6e0a6e80982f27e7283e904fd800783c51344647
BLAKE2b-256 checksum
How to use checksums
1c588bc716018ed5b882f01c9443fc7287927dd6c2b70d92cf2726d3638ce1e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-1041-azure

Release files / lemmy_image_purge-1.0.0-py3-none-any.whl

Download URL lemmy_image_purge-1.0.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13c763ed81ef8f5a5c18e936ffdb6e4eceaa5067b366918b710f61228518abc
BLAKE2b-256 checksum
How to use checksums
cf0241419bbabe141074714e7ce834bf38e130185602d0c9be6cb01337cdda16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-1041-azure

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page