Behavior of _del_node_modules
This post will touch on the directory “_del_node_modules”
Overview
In some App Service Logs, with a App Service Linux - Node.js “Blessed” image (not a custom image, eg. Web App for Containers), you may see a reference to a directory named _del_node_modules.
This directory is created on startup through logic defined in the Node.js Blessed Image’s container entrypoint and startup behavior. You can see the logic invoked to create it if App Service Logs are enabled, and if you look in default_docker.log.
2026-01-30T21:06:43.8273864Z export NODE_PATH="/node_modules":$NODE_PATH
2026-01-30T21:06:43.8273897Z export PATH=/node_modules/.bin:$PATH
2026-01-30T21:06:43.8273929Z if [ -d node_modules ]; then
2026-01-30T21:06:43.8273962Z mv -f node_modules _del_node_modules || true
2026-01-30T21:06:43.8273993Z fi
2026-01-30T21:06:43.8274023Z
2026-01-30T21:06:43.8274065Z if [ -d /node_modules ]; then
2026-01-30T21:06:43.8274098Z ln -sfn /node_modules ./node_modules
2026-01-30T21:06:43.8274130Z fi
2026-01-30T21:06:43.8274162Z
2026-01-30T21:06:43.8274192Z echo "Done."
2026-01-30T21:06:43.8274224Z node server.js
Call outs about this directory
- It is essentially transparent. During deployments, or, mostly any
node_modulesrelated aspects, this should not be touched or worried about. This doesn’t directly affect the application. - This directory has the same package versions as the ones referenced in your
package.jsonand also thenode_modulesbeing used by your application. In some cases, if you have a cloud security scanner, it may flag_del_node_modulesas having outdated versions.- You can SSH into the application container and look at the
package.jsonfor your packages in either/node_modules,/home/site/wwwroot/node_modules, or_del_node_modulesand cross compare these - If there is a scenario where
_del_node_modulesis being flagged as having an older version of packages. Delete the directory, restart, and then redeploy. However, you should ensure the applicationspackage.json(orpackage-lock.json,yarn.lock) should NOT be the one to contain the package version causing this to be flagged in the first place.- Testing with build automation enabled (Oryx) and without (which nowadays most sites will use the same
node_modulecompression logic that Oryx uses as called out in Improved Node.js Deployment Performance on Azure App Service) shows that_del_node_modulesandnode_moduleswill have mirroring package versions
- Testing with build automation enabled (Oryx) and without (which nowadays most sites will use the same
- You can SSH into the application container and look at the
The only directory, in most cases, that you should share about, is the ones described in here: Improved Node.js Deployment Performance on Azure App Service.