[PR #15008] docs: fix Linux uninstall command that mangles paths with tr #61661

Open
opened 2026-04-29 16:43:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15008
Author: @r266-tech
Created: 3/22/2026
Status: 🔄 Open

Base: mainHead: fix-linux-uninstall-tr


📝 Commits (1)

  • 5117c23 docs: fix Linux uninstall command that mangles paths with tr

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/linux.mdx (+1 -1)

📄 Description

Fixes #14931

Problem

The current Linux uninstall docs use tr 'bin' 'lib' to convert the binary path to the library path. However, tr performs character-by-character translation:

  • b → l
  • i → b
  • n → i

This means paths like /usr/local/bin/ollama get mangled to /usr/local/lbl/ollama, which is completely wrong and could cause unexpected rm -r behavior.

Fix

Replace tr 'bin' 'lib' with sed 's|/bin/|/lib/|' which performs proper string substitution of the /bin/ directory component with /\lib/.


🔄 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/15008 **Author:** [@r266-tech](https://github.com/r266-tech) **Created:** 3/22/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-linux-uninstall-tr` --- ### 📝 Commits (1) - [`5117c23`](https://github.com/ollama/ollama/commit/5117c232db3f73091a2506eb86f809bd1162751a) docs: fix Linux uninstall command that mangles paths with tr ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/linux.mdx` (+1 -1) </details> ### 📄 Description Fixes #14931 ## Problem The current Linux uninstall docs use `tr 'bin' 'lib'` to convert the binary path to the library path. However, `tr` performs **character-by-character** translation: - b → l - i → b - n → i This means paths like `/usr/local/bin/ollama` get mangled to `/usr/local/lbl/ollama`, which is completely wrong and could cause unexpected `rm -r` behavior. ## Fix Replace `tr 'bin' 'lib'` with `sed 's|/bin/|/lib/|'` which performs proper string substitution of the `/bin/` directory component with `/\lib/`. --- <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-29 16:43:03 -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#61661