Miktex: No space left on device

Does someone uses latex and miktex and encountered the following error?

2026-06-09 08:37:35,875+0200 INFO  pdflatex - this is MiKTeX-PDFTEX 4.23.0 (1.40.28) (MiKTeX 25.12)
2026-06-09 08:37:35,875+0200 INFO  pdflatex - allowing known shell commands
2026-06-09 08:37:35,912+0200 INFO  pdflatex - going to create file: pdflatex.fmt
2026-06-09 08:37:35,985+0200 INFO  pdflatex.core - forking…
2026-06-09 08:38:17,014+0200 ERROR pdflatex - /nix/store/63ily56lvbg8nplms4f7r8jmkyxp05s3-miktex-25.12/bin/miktex did not succeed; exitCode: 1
2026-06-09 08:38:17,014+0200 ERROR pdflatex - output:
2026-06-09 08:38:17,014+0200 ERROR pdflatex - Building format ‘pdflatex’ with engine ‘pdftex’…

Sorry, but: The executed process did not succeed.

2026-06-09 08:38:17,014+0200 FATAL pdflatex.core - The memory dump file could not be found.
2026-06-09 08:38:17,014+0200 FATAL pdflatex.core - Data: fileName=“pdflatex.fmt”
2026-06-09 08:38:17,015+0200 FATAL pdflatex.core - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp:697
2026-06-09 08:38:17,015+0200 FATAL pdflatex - The memory dump file could not be found.
2026-06-09 08:38:17,015+0200 FATAL pdflatex - Info: fileName=“pdflatex.fmt”
2026-06-09 08:38:17,015+0200 FATAL pdflatex - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp
2026-06-09 08:38:17,015+0200 FATAL pdflatex - Line: 697
2026-06-09 08:38:17,016+0200 INFO  pdflatex - this process (3816) finishes with exit code 1
2026-06-09 08:38:17,017+0200 ERROR pdflatex - major issue: So far, no MiKTeX administrator has checked for updates.
2026-06-09 08:42:09,136+0200 INFO  pdflatex - this is MiKTeX-PDFTEX 4.23.0 (1.40.28) (MiKTeX 25.12)
2026-06-09 08:42:09,137+0200 INFO  pdflatex - allowing known shell commands
2026-06-09 08:42:09,150+0200 INFO  pdflatex - going to create file: pdflatex.fmt
2026-06-09 08:42:09,236+0200 INFO  pdflatex.core - forking…
2026-06-09 08:42:09,949+0200 ERROR pdflatex - /nix/store/63ily56lvbg8nplms4f7r8jmkyxp05s3-miktex-25.12/bin/miktex did not succeed; exitCode: 1
2026-06-09 08:42:09,949+0200 ERROR pdflatex - output:
2026-06-09 08:42:09,949+0200 ERROR pdflatex - Building format ‘pdflatex’ with engine ‘pdftex’…

Sorry, but: No space left on device: path=“/var/cache/miktex-texmf/miktex/data/le/”

2026-06-09 08:42:09,949+0200 FATAL pdflatex.core - The memory dump file could not be found.
2026-06-09 08:42:09,950+0200 FATAL pdflatex.core - Data: fileName=“pdflatex.fmt”
2026-06-09 08:42:09,950+0200 FATAL pdflatex.core - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp:697
2026-06-09 08:42:09,950+0200 FATAL pdflatex - The memory dump file could not be found.
2026-06-09 08:42:09,950+0200 FATAL pdflatex - Info: fileName=“pdflatex.fmt”
2026-06-09 08:42:09,950+0200 FATAL pdflatex - Source: Libraries/MiKTeX/TeXAndFriends/texmfapp.cpp
2026-06-09 08:42:09,950+0200 FATAL pdflatex - Line: 697
2026-06-09 08:42:09,953+0200 INFO  pdflatex - this process (4127) finishes with exit code 1
2026-06-09 08:42:09,953+0200 ERROR pdflatex - major issue: So far, no MiKTeX administrator has checked for updates.

Does miktex need write permissions or is this a problem because of nixos declarative nature?

Looks more like you’re running out of disk space.

1 Like

I already checked that and I have 30GB free disk space left

I think it’s a permission problem, I get different errors if I use sudo or not.
Do you know how to completly remove the miktex config and data files?

On which disk exactly? Or do you have indeed only a singular and global / mount without anything else? Also 30 GiB can be quite little, depending on the size of the disk.

The root reserve does exist.

Which again would also be a way to explain why you get a different error as root.

At the same time you haven’t said what that error was.

Last but not least, how do you install miktex? Why are you not using the TL distribution from nixpkgs?

2 Likes

I installed miktex because texliveMedium and texlivePackages.minted but it doesn’t get recognized while using pdflatex.

config:

environment.systemPackages = with pkgs; [
texliveMedium
texmaker
# miktex # commented because error
# tectonic

texlivePackages.ginpenc
texlivePackages.latex-uni8
texlivePackages.minted
texlivePackages.fancyhdr
texlivePackages.xcolor
texlivePackages.graphics
texlivePackages.float
texlivePackages.multirow
texlivePackages.todonotes
texlivePackages.hyperref
texlivePackages.algorithm2e
texlivePackages.tocloft
texlivePackages.listings
texlivePackages.tcolorbox
texlivePackages.enumitem
texlivePackages.geometry

];

I get the error with pdflatex *.tex

LaTeX Error: File `minted.sty' not found.

you probably want to read this https://nixos.org/manual/nixpkgs/stable/#sec-language-texlive-user-guide

3 Likes

Fully agree with truh.

To help preserve the usefulness of this post in case of linkrot, here is the 20% of that link that provides 80% of what is needed to know:

Packages cannot be used directly but must be assembled in an environment. To create or add packages to an environment, use

texliveSmall.withPackages (
  ps: with ps; [
    collection-langkorean
    algorithms
    cm-super
  ]
)

The function withPackages can be called multiple times to add more packages.

Do read the link though, it covers many useful things.

1 Like

@truh @withakay
Thank you both that solved my problem and the error using texliveMedium

home.packages = with pkgs; [
  pympress
  # texliveMedium
  texmaker

  (texliveSmall.withPackages (ps:
    with ps; [
      latex-uni8
      minted
      fancyhdr
      xcolor
      graphics
      float
      multirow
      todonotes
      hyperref
      algorithm2e
      tocloft
      listings
      tcolorbox
      enumitem
      geometry
      ifoddpage
      relsize
      tikzfill
      pdfcol
      biblatex
      biblatex-ieee
    ]))
];
1 Like