Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 0x00000040

Print jobs stuck: error 0x00000040 and a print queue that will not clear

10 min read Updated October 4, 2026 Networking, Sharing & Printing

Fix it now

Microsoft publishes 0x00000040 as ERROR_NETNAME_DELETED, the specified network name is no longer available. On a print job it means the spooler lost the printer or the print server partway through and the job it was writing has nowhere to go. It then sits in the queue, marked Error or Deleting, because tidying it up also needs the destination.

Run these in an elevated session; delete the spool files between the stop and the start

Get-PrintJob -PrinterName "QueueName"
net stop spooler
net start spooler
Get-PSDrive C | Select-Object Used,Free
  1. Try the polite route first: Remove-PrintJob -PrinterName "QueueName" -ID <id> for each job the first command lists.
  2. If a job will not go, stop the spooler, delete every file inside C:\Windows\System32\spool\PRINTERS – the contents, not the folder – then start the spooler again.
  3. Read the free space figure. A full drive produces exactly this behaviour and will do it again tomorrow, and on a print server it is the drive holding the spool folder that matters.
  4. Print one small document to confirm the queue moves, then a large one to confirm it keeps moving.

On a shared print server, warn users before clearing the folder. Anything waiting will have to be sent again, and a truncated job is not recoverable in any case.

If the queue is empty and jobs are printing, you are done. If they stick again, the next section explains why a job can be stuck rather than simply failed.

Why it happens

The spooler writes each job to disk as a pair of files in the spool folder: the rendered data and a small descriptor holding the job’s state. It then feeds the data to the port. If the port disappears mid-job, because a network path dropped or the print server closed the session, the spooler is left holding a job whose destination no longer exists. It marks the job as errored and tries to release it, and the release path also needs the destination, so the job stays.

Disk space produces the same stall from the other direction. A job that cannot be written completely leaves a truncated spool file, and the spooler will not hand a truncated job to the port. On a print server with several large jobs in flight this hits the system drive first, because that is where the spool folder lives by default.

The three companions sit in the same small block of Windows errors and describe the neighbouring conditions precisely. 0x0000003F is ERROR_PRINT_CANCELLED, your file waiting to be printed was deleted – what a user sees when somebody else clears the queue underneath them. 0x0000003D is ERROR_PRINTQ_FULL, the printer queue is full. 0x0000003E is ERROR_NO_SPOOL_SPACE, space to store the file waiting to be printed is not available on the server, which names the server explicitly and is worth taking literally.

The spool drive has run out of space

You have this one if 0x0000003E appears, or the drive holding the spool folder shows very little free space and large jobs fail while small ones succeed.

  1. Check free space with Get-PSDrive C | Select-Object Used,Free.
  2. Free space, then clear the stuck jobs with the spooler stopped.
  3. On a print server, move the spool folder to a data drive through Print Server Properties, then restart the spooler.
  4. Size that drive for the largest jobs your users actually send, not the average.

Create the new folder first and give the spooler service account write access to it, then set the path. A path that does not exist stops printing entirely.

The connection to the print server or device dropped mid-job

You have this one if 0x00000040 exactly, on a networked queue, often on a laptop that moved between access points or came out of sleep.

  1. Confirm the destination is reachable now with Test-NetConnection printsrv -Port 445, or the device’s own port for a direct connection.
  2. Clear the stuck job through the spool folder as above.
  3. On laptops, stop the adapter being powered down during idle periods: Device Manager, the adapter, Power Management tab, and clear the option that lets Windows turn the device off.
  4. Reprint the document rather than trying to resume the old job. A truncated job is not recoverable.

A driver is taking the spooler down under load

You have this one if The spooler stops on its own during large or graphics-heavy jobs, and printing dies for everyone at once.

  1. Look in the PrintService Admin log for the driver named around the crash.
  2. Move that driver into isolation through Print Management, the queue, Properties, Advanced, so a fault does not take the whole service down.
  3. Update the driver, or move the queue to the in-box class driver if the manufacturer has nothing current.
  4. Set service recovery: Services console, Print Spooler, Recovery tab, restart on first and second failure.

The queue itself is holding the jobs back

You have this one if 0x0000003D, jobs piling up while nothing prints, and the queue paused or set to a time that has not arrived.

  1. Open the queue and clear Pause Printing and Use Printer Offline from the Printer menu.
  2. Check the Advanced tab for an availability window restricting when the printer accepts work.
  3. Confirm the device is not itself holding the jobs for a code, an account or a stored-print release nobody has entered.

Full reference

The four codes and their published text

Code Published meaning
0x00000040 ERROR_NETNAME_DELETED: the specified network name is no longer available
0x0000003F ERROR_PRINT_CANCELLED: your file waiting to be printed was deleted
0x0000003D ERROR_PRINTQ_FULL: the printer queue is full
0x0000003E ERROR_NO_SPOOL_SPACE: space to store the file waiting to be printed is not available on the server

0x0000003E is the most specific of the four and the one people most often generalise. Microsoft’s wording puts the missing space on the server, so on a shared queue it is the print server’s spool drive you should be looking at, not the workstation’s. A user who is told to clear their own disk on the strength of it will find nothing and lose an hour.

Where the pieces live

Item Location or command
Spool folder C:\Windows\System32\spool\PRINTERS by default
Change the spool folder Print Server Properties, on the server
Stop and start the service net stop spooler then net start spooler
List queued jobs Get-PrintJob -PrinterName "QueueName"
Remove one job Remove-PrintJob -PrinterName "QueueName" -ID <id>
Spooler event log Applications and Services Logs, Microsoft, Windows, PrintService

Why Cancel does not work and stopping the service does

Cancelling a job asks the spooler to release it, and releasing it involves the destination that has gone away. Stopping the service breaks that dependency: the spooler is no longer holding anything, the files on disk are just files, and deleting them removes the job with nothing left to tidy up. That is the whole reason the stop-clear-start sequence works when the user interface does not, and it is why the sequence has to be done in that order.

Moving the spool folder on a print server

  1. Create the destination folder on the data drive first.
  2. Give the account the spooler runs as write access to it.
  3. Set the new path in Print Server Properties on the server.
  4. Restart the spooler.
  5. Print a test page before you consider it done, and check that spool files are appearing in the new location rather than the old.

Do not script the stop-clear-start sequence as a scheduled job. As an emergency tool it is fine. As a routine it hides the real fault – a driver, a link or a disk – and it silently destroys the print jobs of anyone unlucky enough to be printing when it runs.

When jobs stick again the next day

  • Check whether the same queue and the same driver are involved each time. A single driver is the most common cause of a recurring stall.
  • Check the free space trend on the spool drive rather than its value right now.
  • On laptops, check whether the disconnections line up with sleep, docking or moving between access points.
  • Check whether the device itself is holding jobs for a release code, which looks identical from the workstation.
  • Look at the PrintService Operational log as well as Admin. It records the jobs themselves and gives you the timing.

Every code this article covers

Code What it points at Source
0x00000040 ERROR_NETNAME_DELETED: the specified network name is no longer available Microsoft Learn
0x0000003F ERROR_PRINT_CANCELLED: your file waiting to be printed was deleted Microsoft Learn
0x0000003D ERROR_PRINTQ_FULL: the printer queue is full Microsoft Learn
0x0000003E ERROR_NO_SPOOL_SPACE: space to store the file waiting to be printed is not available on the server Microsoft Learn

Confirm the fix worked

  1. Open the queue and confirm it is empty, with no jobs left in an error or deleting state.
  2. Print a multi-page document and watch the job enter and leave the queue.
  3. Check free space on the spool drive after the test job, to confirm space is being released.
  4. Confirm the Print Spooler service is still running an hour later rather than stopped again.
  5. On a shared queue, have a second user print, so you know the fix was not local to one profile.

Questions people ask about this

Does fixing this cost anything?

No. Clearing a stuck queue uses the Services console, File Explorer and the printing cmdlets that ship with Windows. If disk space is the underlying cause, the cost is storage, not software.

Why does the job say Deleting and never go?

Because the spooler needs the destination to finish releasing the job, and the destination is gone. Stopping the service breaks that dependency, which is why clearing the spool folder works when Cancel does not.

I got 0x0000003E. Whose disk is full?

Microsoft’s wording puts it on the server: space to store the file waiting to be printed is not available on the server. On a shared queue, check the print server’s spool drive before you send the user off to clear their own.

Can I automate the clear-out?

You can script the stop, delete and start as an emergency tool. It is a poor routine job: if you need it regularly, something is wrong with the driver, the link or the disk, and the script hides it while destroying other people’s jobs.

Will moving the spool folder break anything?

Only if the new location is missing or not writable by the service account. Create the folder first, set the path, restart the spooler and print a test page before you consider it done.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error VPN error 809 and 800: IKE traffic blocked before the tunnel can open License Error Scan to folder fails with 0xC00000CC: the copier cannot reach your share License Error RDP error 0x80090326: the TLS handshake was rejected before logon Free Fix Error 0x8009030C: logon denied when NTLM is blocked or restricted
โ† Back to Knowledge Base