# Package manager install followed by remove, keeps platform specific sub-packages?

**URL:** <https://racket.discourse.group/t/package-manager-install-followed-by-remove-keeps-platform-specific-sub-packages/256>\
**Category:** Questions & Answers\
**Created:** [November 25, 2021, 3:46am UTC](https://racket.discourse.group/t/package-manager-install-followed-by-remove-keeps-platform-specific-sub-packages/256 "2021-11-25T03:46:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonls](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/simonls/32/170_2.png) [@simonls](https://racket.discourse.group/u/simonls)\
**Post date:** [November 25, 2021, 3:46am UTC](https://racket.discourse.group/t/package-manager-install-followed-by-remove-keeps-platform-specific-sub-packages/256/1 "2021-11-25T03:46:35Z")

</div>

In another topic I noticed that when I install the `libsqlite3` package and then remove it again, its platform specific sub package keeps being installed. I would have expected that it is removed with its parent package because it was installed implicitly through it.

The commands I used were simply:  
`raco pkg install libsqlite3` and `raco pkg remove libsqlite3`

The package `libsqlite3-x86_64-linux` stayed installed, to remove it I called `raco pkg remove libsqlite3-x86_64-linux`

[Sqlite3-connect crashes with “invalid memory reference”](https://racket.discourse.group/t/sqlite3-connect-crashes-with-invalid-memory-reference-but-only-when-racket-gui-is-required/239/9#bug-2)

For me this looks like a bug because an automatically installed package, should also be removed automatically. Is there some reason why it can't work like that?

---

<div class="post-metadata">

**Author:** ![SamPhillips](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samphillips/32/15_2.png) [@SamPhillips](https://racket.discourse.group/u/SamPhillips)\
**Post date:** [November 25, 2021, 5:35am UTC](https://racket.discourse.group/t/package-manager-install-followed-by-remove-keeps-platform-specific-sub-packages/256/2 "2021-11-25T05:35:39Z")

</div>

You probably want to run `raco pkg remove --auto $somepackage`. The `--auto` flag:

> In addition to removing each ‹pkg›, removes [auto-installed](https://docs.racket-lang.org/pkg/Package_Concepts.html#%28part._concept~3aauto%29) packages (i.e., installed by the search-auto or search-ask dependency behavior, or demoted via --demote) that are no longer required by any explicitly installed package.

-- [https://docs.racket-lang.org/pkg/cmdline.html#(part.\_raco-pkg-remove)](https://docs.racket-lang.org/pkg/cmdline.html#%28part._raco-pkg-remove%29)

---

<div class="post-metadata">

**Author:** ![simonls](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/simonls/32/170_2.png) [@simonls](https://racket.discourse.group/u/simonls)\
**Post date:** [November 25, 2021, 5:59am UTC](https://racket.discourse.group/t/package-manager-install-followed-by-remove-keeps-platform-specific-sub-packages/256/3 "2021-11-25T05:59:53Z")

</div>

Ah ok, I somehow thought that platform specific dependencies installed without a prompt automatically, but the real reason I didn't get a prompt, was because I already had the dependency installed.

So it does make sense and `raco pkg install --auto` and `raco pkg remove --auto` are symmetric / opposites.

I could argue that `raco pkg install` and `raco pkg remove` are still not "equals" / matching operations, because the former gives me an interactive prompt whether I want to install dependent packages, but the latter doesn't give me a prompt whether I want to auto remove packages.  
From a user interface perspective, I think it would be nice if the operations behave similarly.

That said, I don't know how practical it would be to implement that, would probably be annoying if default behavior changes, considering tooling, scripts, backwards compatibility. So overall to much trouble for little benefit.

So instead I will keep in mind to use --auto when removing packages.
