Fix Spotify Error Code 18 on Windows 10 – Installation Issue
Spotify is available for Windows 10 as a desktop app and as a UWP app in the Microsoft Store. The UWP version of the app works as well as the desktop version but many users still favor the desktop version.
The desktop version of Spotify is still actively maintained so there is little reason for anyone to switch to the UWP app. That said, when Spotify runs into problems, reinstalling it is often the best solution. Reinstalling Spotify is easy but you may run into Spotify Error Code 18 during installation. This error is one of the more frustrating installation issues because it can persist even after a clean uninstall.
ALSO READ: Trouble opening Spotify? Try these fixes.
Spotify error code 18
Spotify Error Code 18 appears when you try to install Spotify. This may be after uninstalling the app or when you’re installing it for the first time. This normally happens when the app is unable to write to files because they are in use. Here’s how to fix it.
1. Restart the system
If you’ve recently uninstalled Spotify, or you’ve installed/uninstalled other apps, restart your system. Windows 10 normally does not need to restart after installing or uninstalling an app but there are always exceptions. Restart the system and then try installing Spotify.
2. End Spotify background processes in Task Manager
Spotify Error Code 18 often appears because Spotify was uninstalled but one of its processes or services is still running in the background, keeping files locked and preventing the installer from writing to them. Before you delete any folders or retry the installer, check Task Manager and close every Spotify-related process manually.
- Press Ctrl + Shift + Esc to open Task Manager.
- Click the Processes tab.
- Look for any process named Spotify, SpotifyWebHelper, or anything else carrying the Spotify name or logo.
- Right-click each one and select End task.
- Once all Spotify processes have been ended, retry the installer.
If the installer still fails after ending those processes, move on to the next steps to remove leftover files before trying again.
3. Delete Spotify directory to resolve Spotify Error Code 18
If you’re reinstalling Spotify, manually delete all its directories first. Spotify leaves files in two separate AppData locations — Roaming and Local — and both need to be cleared to avoid the installer conflict that triggers Spotify Error Code 18.
- Press Windows + R to open the Run dialog.
- Type
%AppData%and press Enter. - Look for a folder named Spotify and delete it.
- Press Windows + R again to open Run.
- Type
%LocalAppData%and press Enter. - Look for a folder named Spotify and delete it.
- Go to This PC.
- In the search bar enter Spotify and tap Enter.
- Delete all the results i.e. all files and folders.
- Restart the system.
- Install Spotify.
Troubleshooting note: If Windows displays a message saying a Spotify file is “open in System” or “in use by another process” when you try to delete it, do not force-delete it with a third-party tool yet. Instead, restart your PC first and then attempt to delete the file again before running the installer. A restart is usually enough to release the lock.
4. Quit Spotify-related apps
Certain apps running in the background are known to hold file handles that conflict with the Spotify installer. This step is about identifying and closing those specific programs — not just unofficial Spotify clients, but also well-documented third-party software conflicts.
Steam
Steam is one of the most commonly reported culprits for Spotify Error Code 18. Closing it from the taskbar is not always enough — Steam continues running background processes even after you dismiss the window.
- Click the Steam menu in the top-left corner of the Steam app.
- Select Exit to fully close Steam.
- Press Ctrl + Shift + Esc to open Task Manager.
- Check the Processes tab and end any remaining Steam or SteamService processes.
- Retry the Spotify installer.
iTunes and Comodo products
iTunes and Comodo Firewall / Comodo Antivirus are among the most frequently reported software conflicts for error code 18. If either is installed on your system, try the following:
- Temporarily uninstall or disable iTunes and any Comodo products (Comodo Firewall, Comodo Antivirus, or Comodo Internet Security).
- Restart your PC.
- Install Spotify.
- Once Spotify is successfully installed, reinstall or re-enable those applications if you need them.
If you have other unofficial Spotify clients or helper apps installed, quit all of them and make sure none of them run at startup before attempting installation.
5. Perform a clean boot to rule out third-party conflicts
If the steps above haven’t resolved Spotify Error Code 18, a background service may still be locking Spotify files without being obvious in Task Manager. A clean boot starts Windows with only Microsoft services running, which isolates whether a third-party program is causing the conflict. This is less disruptive than Safe Mode and is the right next step before going there.
- Press Windows + R, type
msconfig, and press Enter. - Go to the Services tab.
- Check the box for Hide all Microsoft services.
- Click Disable all to disable the remaining third-party services.
- Go to the Startup tab and click Open Task Manager.
- In Task Manager, disable every startup item listed.
- Close Task Manager, click OK in msconfig, and restart your PC.
- Run the Spotify installer.
- Once Spotify installs successfully, open msconfig again and re-enable your services and startup apps to restore normal startup.
If Spotify installs cleanly after a clean boot, you know a third-party service was the cause. You can re-enable your services in small batches and restart each time to identify the specific culprit.
6. Install in Safe Mode (networking enabled)
If you’re still unable to install Spotify, try installing it in Safe Mode.
- Open the Start Menu.
- Click the Power button.
- Hold down the shift key and click Restart.
- You will boot to the Troubleshoot menu.
- Go to Advanced Options>Startup Settings>Restart.
- From the list of options, select the one for Safe Mode with networking.
- Install Spotify.
7. Use the Microsoft Store version
If all else fails, you can install Spotify from the Microsoft Store. This version does not show Spotify Error Code 18 because it does not create a directory in the AppData folder. It’s a UWP app and they work differently.
- Visit this link in your browser.
- Click Get.
- Open the Microsoft Store app when prompted to.
- Click Get and then Install.
- Spotify will be installed on your system.
Conclusion: Fixing Spotify Error Code 18
Spotify Error Code 18 is a common issue for users who rely on the desktop app. The error is almost always caused by locked files or conflicting background processes, which is why the fixes above focus on clearing those obstacles before running the installer again.
If all else fails, the UWP app from the Microsoft Store is always a safe alternative. If you’re determined to use the desktop app and the above steps aren’t helping, check the other apps installed on your system, especially media apps or games. They’re known to interfere with Spotify’s installation, but there is no exhaustive list of them available.