Skip to content

Instantly share code, notes, and snippets.

@zoltan-kiss-hungary
Last active February 15, 2026 13:56
Show Gist options
  • Select an option

  • Save zoltan-kiss-hungary/04a89c4d7adc78897a392d6beafd2f55 to your computer and use it in GitHub Desktop.

Select an option

Save zoltan-kiss-hungary/04a89c4d7adc78897a392d6beafd2f55 to your computer and use it in GitHub Desktop.
Fake a local Debian repository for Modrinth
# inspired by https://gist.github.com/onjin/ef1ba348b2ff79808811e280df2d263c
#!/bin/bash
debdir=/usr/local/modrinthdebs
aptconf=/etc/apt/apt.conf.d/100update_modrinth
sourcelist=/etc/apt/sources.list.d/modrinthdebs.list
sudo apt install wget curl
# https://modrinth.com/app couldn't be parsed without JS, hence the workaround to use this Arch repo
sudo mkdir -p $debdir
( echo 'APT::Update::Pre-Invoke {"cd '$debdir' && wget -qN `curl -s https://aur.archlinux.org/packages/modrinth-app-bin 2>&1 | grep -P -m 1 -o 'https://.*?amd64.deb' | head -1` && apt-ftparchive packages . > Packages && apt-ftparchive release . > Release";};' | sudo tee $aptconf
echo 'deb [trusted=yes lang=none] file:'$debdir' ./' | sudo tee $sourcelist
) >/dev/null
sudo apt update
sudo apt install modrinth-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment