All Products
Search
Document Center

Alibaba Cloud DevOps:Large File Storage (LFS) Cleanup

Last Updated:Apr 16, 2025

Follow the steps to clean up LFS binary resource file and solve the issues like local push fails after deleting LFS resource documents.

Clean up LFS binary resource file

When managing binary files with LFS, deleting Git source files does not automatically remove the associated LFS resource files. You can clean them up manually by following the steps below:

  1. Click Settings.

  2. Click Large File Storage.

  3. Select the files you want to delete

  4. Click Delete.

3-16

Note

To view the LFS resource files currently associated with the repository, use the following command. Then, delete any unnecessary LFS resource files outside this list as needed:

git lfs ls-files:
//Show information about Git LFS files in the index and working tree.

The code repository page cannot be viewed or local push fails after deleting LFS resource documents

This issue occurs because the Git LFS Pointer file remains in the repository, but the related oid file is missing.

0b15a9ce961fc246ddc70467c9393517

Similar prompts, as indicated below, appears on Codeup, or when executing commands such as git push.

[404] Object does not exist on the server
[xxxxxxxxxxxxxxx...xxxxxxxxxxxxxxx] Object does not exist on the server

To solve this, re-add and upload the deleted files to the Git LFS server.

$ cp original file xxx.data
$ git add xxx.data
$ git lfs push <remote> <branch> --all
$ git checkout xxx.data