Sometimes when you try to update a game on steam, you will get the following error:
An error occurred while updating [game] (Content file locked)
What this error means is that Steam was unable to write the new update files to the disk. While there are tons of solutions for this particular issue, one that has worked out most efficiently is this: Uninstall steam > Remove all the local game files and then re-install everything from scratch.
While the above method does work out well for most of the users, it is very time consuming and cumbersome for most users.
And that is why, before taking the approach mentioned above, we have listed some easy troubleshooting tips on this page which you may want to give a shot.
Check Your Antivirus
There have been situations where antivirus software had falsely flagged steam files as malicious and quarantined them. So, it is a good idea to temporarily disable the antivirus software and see if this problem gets resolved.
Below, we have listed the steps to deactivate some of the most commonly used antivirus software.
Sometimes, Kaspersky flags the steam files as an intruder for trying to make changes to the files on your hard disk. You can easily fix this by:
- Go to ‘threads and exclusions‘.
- Navigate to ‘trusted zone’.
- Add Steam.exe as a trusted application.
Please do remember to change the settings to Do not restrict application activity as well as Do not scan opened files.
ESET NOD32 sometimes marks genuine files as malicious and quarantine them. When this happens to a steam file, this usually results in an error while updating the file. You can follow the steps below to stop ESET from quarantining steam files:
- Go to the folder when you have steam on your computer and copy the address from the address bar. For example, let us say this is the location:
- Open ESET NOD32 and paste the address you copied in the ‘exclude from real-time scanning‘ section.
Once you do the above steps, perform the following:
- Restart your computer.
- Open Steam.
- Go to the library section and right-click on the game that is having problems.
- Click on its properties and select the local files tab.
- Click the ‘Verify integrity of game cache‘ button and Steam will verify that game in a few minutes.
Unlike a few other antivirus suites, McAfee does not have an option to exclude only a few files/folders from real-time scanning. The only way is to completely disable antivirus protection until you update steam games. To do this:
- Open McAfee.
- Select “Virus and Spyware Protection”.
- Turn off ‘Real-Time Scanning‘.
Once you do the above, follow the steps we mentioned in the ‘ESET NOD32’ section to ‘Verify integrity of game cache‘ on Steam.
Repair Corrupt Steam Game Files
- Close and exit steam completely.
- Go to the folder where you have steam installed on your machine.
- Open the folder ‘logs’ and open ‘txt’.
- Navigate to the bottom of the text file and look for recent errors.
Here’s a sample error:
[2017-04-12 12:47:31] [AppID 346110] Update canceled: File commit failed: failed to move unchanged file “C:Program Files (x86)Steamsteamappsworkshopcontent346110570371714LinuxNoEditorNPCFemaleAssetsNudeNude_Human_Female_Body_D.uasset.z.uncompressed_size” (Disk write failure)
The number written first in the URL is your APPID. In the above sample, it is 346110 which is the AppID for ARK Survival Evolved.
- Navigate to the root folder of the mod, in this case, it is 570371714.
- Now, restart steam and go to the ‘Downloads‘ folder. Now, Steam will ask for an update for the game. Update the necessary files and you should be good.
Winsock catalog is another common root cause for the failure to update steam file games. We can execute a simple command to resolve this issue.
- Open the ‘Run’ dialog by pressing Windows Key + R.
- In the run dialog, type this:
netsh winsock reset
- Press the enter key to execute the command.
- Restart your computer.
Change Steam Installation and Game Files Location
Unlike the methods described above, this one is not going to be simple. As the title says, we are going to completely change the folder where we have steam and steam game files are present on the computer.
As this method is a bit complex, we have broken it into two parts. In the first part, we will attempt to move steam files and see if it works as expected. And if it doesn’t, we will have to take the matter into our own hands and re-install steam – which is the not-so-fun second part.
Any interruption to the copying process has the ability to potentially corrupt game files – in which case – we have no other option but to re-install steam altogether.
The first part
- Open steam.
- Go to Settings.
- Click on ‘Steam Library Folders’.
- Click on ‘Add Library Folder’ and select a new path where you want Steam to be located. Note: This is the path where future steam files will be deployed.
- Next, we shall move the current/existing steam files to the above new location. To do this, close and exit steam client.
- Navigate to the current folder where steam is installed.
- Cut all the folders except SteamApps and UserData folders and the .exe file and paste them in to the new folder which we gave in the previous steps.
- Launch Steam and log in.
Now, if everything works fine – you are good. If it doesn’t –
The not-so-fun second part
- Close Steam client.
- Got to the new folder where you moved the Steam files.
- Locate the ‘SteamApps’ folder > Copy and paste it to your desktop.
- Uninstall Steam.
- Install Steam again to the original location that you selected.
- Move the SteamApps folder in the new Steam directory where it is installed. This will copy all of your game content, your saved games, and settings.
- Open the Steam client and enter your credentials.
- Verify the integrity of Steam game files.
Use the Built-in Windows Check Disk Scan
The issue might also occur due to bad sectors in the hard disk. If the steam files happen to be in these ‘bad’ sectors, then it might cause issues in accessing these files during updates. You can use the built-in windows function
chkdsk to find and fix bad sectors in the hard disk.
- Press Windows Key + R.
- In the run dialog that appears, type in cmd and press enter.
- Next, execute this command in the command prompt: chkdsk c: /f
- Press “Y” to confirm the scheduling of a disk check scan.
Wait for the scan to complete and check if the problem still persists.
Use Steam as Administrator
Sometimes, when you run Steam from an account that does not have elevated admin rights, it might cause issue when accessing certain files or folders. Yeah, Windows is weird that way. To solve this, we can run the Steam client as Administrator to see if it helps fix the issue.
- Right-click on the Steam client.
- Select ‘Run as administrator’.
- Let the Steam client open and see if the problem still persists.