Package archives pile up on a small root disk after a few years of updates.
du -sh /var/cache/apt/archives
sudo apt clean
Every installed package leaves its .deb file behind in that folder. apt clean deletes all of them and does not touch installed software. apt autoclean only deletes files for versions that can no longer be downloaded, so it frees less. Reinstalling a package afterwards means downloading it again. In a Dockerfile, remove the package lists in the same layer as the install, with rm -rf /var/lib/apt/lists/*, or the space stays in the image.
Further reading: apt-get manual page
Going deeper: Guide: your Unraid cache is full and Docker stopped, how to find out why and fix it