[PR #491] [MERGED] add autoprune to remove unused layers #20722

Closed
opened 2026-04-19 15:13:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/491
Author: @pdevine
Created: 9/7/2023
Status: Merged
Merged: 9/11/2023
Merged by: @pdevine

Base: mainHead: autoprune


📝 Commits (2)

  • 572b09b add autoprune to remove unused layers
  • 6d39bfa address comments

📊 Changes

3 files changed (+136 additions, -19 deletions)

View changed files

📝 cmd/cmd.go (+6 -0)
📝 server/images.go (+129 -19)
📝 server/routes.go (+1 -0)

📄 Description

This change will remove any unused layers for models. It runs at server startup, and will also clean up on pull or create commands which can orphan older layers.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/491 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 9/7/2023 **Status:** ✅ Merged **Merged:** 9/11/2023 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `autoprune` --- ### 📝 Commits (2) - [`572b09b`](https://github.com/ollama/ollama/commit/572b09beb967799f8b0d81f7c1e57345774d2ad2) add autoprune to remove unused layers - [`6d39bfa`](https://github.com/ollama/ollama/commit/6d39bfa5905d88e4fe4c0359b255e7adacba56b9) address comments ### 📊 Changes **3 files changed** (+136 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+6 -0) 📝 `server/images.go` (+129 -19) 📝 `server/routes.go` (+1 -0) </details> ### 📄 Description This change will remove any unused layers for models. It runs at server startup, and will also clean up on `pull` or `create` commands which can orphan older layers. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 15:13:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#20722