Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Updating Homebrew Cask Database After Moving an Installed App #19280

Open
1 task done
Else00 opened this issue Feb 9, 2025 · 0 comments
Open
1 task done

Allow Updating Homebrew Cask Database After Moving an Installed App #19280

Else00 opened this issue Feb 9, 2025 · 0 comments
Labels
features New features

Comments

@Else00
Copy link

Else00 commented Feb 9, 2025

Verification

Provide a detailed description of the proposed feature

Currently, Homebrew Cask does not allow users to move an installed application (.app) to another location and update its database to reflect the new path. If a user moves an app manually (e.g., to an external drive due to limited SSD space), Homebrew loses track of it and requires a full reinstall to manage future updates.

Proposed Solutions:

  1. Introduce a brew cask move <app> <new_location> command

    • This command would update Homebrew’s database with the new location, preventing the need for an uninstall/reinstall cycle.
  2. Implement a brew cask update-location <app> <new_location> command

    • This command would allow users to manually move an app and then update Homebrew’s records without requiring a reinstall.
    • It would serve users who move applications dynamically between drives but want Homebrew to continue tracking them for updates.
  3. Implement brew cask rescan

    • This command would scan common directories (/Applications, ~/Applications, external drives) to detect relocated applications and update the database accordingly.
  4. Allow a configurable list of app locations

    • Introduce a configuration file or environment variable (e.g., HOMEBREW_CASK_LOCATIONS) that lets Homebrew track apps across multiple directories.

What is the motivation for the feature?

Apple charges an incredibly high premium for larger SSD configurations so users need to dynamically move applications between an internal drive and an external storage device. Without this feature, users must either:

  • Manually reinstall the app each time they move it (which is inefficient).
  • Use symlinks, which do not always work correctly for all apps.
  • Abandon Homebrew Cask for managing heavy GUI apps, reducing its usefulness.

I am already aware of the existing solutions (symlinks, reinstalling with --appdir, etc.), but these do not work for my use case because they either break app functionality or require an unnecessary full reinstall.

Please do not suggest existing methods that require a reinstall. The goal is to have a way to move an installed app and update Homebrew’s database without breaking updates.

How will the feature be relevant to at least 90% of Homebrew users?

Even for users who don’t frequently move apps, having the option to relocate and update the Homebrew database without reinstalling would be highly beneficial.

  • Apple charges an incredibly high premium for larger SSD configurations, making it prohibitively expensive for many users to upgrade their internal storage.
  • Macs are not easily upgradable, as their SSDs are soldered onto the logic board as part of the SoC, requiring advanced techniques like desoldering to replace, which is impractical for most users.
  • Many users already offload large applications (e.g., IDE, video editors, games, etc.) to external drives.
  • This change would make Homebrew Cask more in line with how users actually manage applications, without breaking updates.

What alternatives to the feature have been considered?

I am aware of the following existing solutions, but they do not work for my specific use case:

  • Manually reinstalling apps each time with different --appdir (inefficient and disruptive).
  • Symlinking moved apps back to /Applications (not always reliable, and some apps break).
  • Using a wrapper script to uninstall/reinstall apps dynamically (workaround but not an ideal solution).

Since none of these workarounds fully solve the problem, a built-in feature for relocating installed apps would greatly enhance Homebrew Cask.

@Else00 Else00 added the features New features label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features New features
Projects
None yet
Development

No branches or pull requests

1 participant