# Installing older version of package than available?

**URL:** <https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757>\
**Category:** Developing with flox\
**Created:** [June 5, 2023, 3:48pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757 "2023-06-05T15:48:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon59756714](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon59756714](https://discourse.flox.dev/u/anon59756714)\
**Post date:** [June 5, 2023, 3:48pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/1 "2023-06-05T15:48:45Z")

</div>

Due to how flox packages work, there are 3 stabilities. But what if I want to install really old package that is not in there? Is there an option to subscribe to nixpkgs?

There is a [community tool](https://lazamar.co.uk/nix-versions/?channel=nixos-22.11&package=terraform) to find which nixpkgs hash has which package version but it’s something I would like to avoid using as it’s not a way I want to work with it 🙂

---

<div class="post-metadata">

**Author:** ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)\
**Post date:** [June 7, 2023, 2:46pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/2 "2023-06-07T14:46:34Z")

</div>

Yes you should still be able to install older packages using an inline declaration ( we are making progress on allowing this from the CLI in the future though ).

So lets say you used a search tool like the one you linked to find an old release of terraform at 1.0.7.

```auto
$ flox edit -e my-env;
# Write your inline package like this.
# Replace that `rev' with whatever you'd like.
{
  inline.packages.terraform = { system, ... }: let
    nixpkgs = builtins.getFlake
                "github:NixOS/nixpkgs/f8f124009497b3f9908f395d2533a990feee1de8";
  in nixpkgs.legacyPackages.${system}.terraform;
}

```

---

<div class="post-metadata">

**Author:** ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)\
**Post date:** [June 13, 2023, 7:50pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/3 "2023-06-13T19:50:46Z")

</div>

Glad to help, I also realized that this should work as well. Let me know if you have any further questions.

```auto
{
  packages."github:NixOS/nixpkgs/<REV>".terraform = {};
}

```

---

<div class="post-metadata">

**Author:** ![anon59756714](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon59756714](https://discourse.flox.dev/u/anon59756714)\
**Post date:** [June 21, 2023, 3:21pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/4 "2023-06-21T15:21:53Z")

</div>

This does not work, Nix tried to download `https://api.github.com/repos/NixOS/nixpkgs/commits/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a` for some reason

---

<div class="post-metadata">

**Author:** ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)\
**Post date:** [June 21, 2023, 3:37pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/5 "2023-06-21T15:37:33Z")

</div>

Do you mean that the second option didn’t work? Or did the first fail as well?

---

<div class="post-metadata">

**Author:** ![anon59756714](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon59756714](https://discourse.flox.dev/u/anon59756714)\
**Post date:** [June 21, 2023, 3:57pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/6 "2023-06-21T15:57:14Z")

</div>

the second, the first works

---

<div class="post-metadata">

**Author:** ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)\
**Post date:** [June 22, 2023, 4:38pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/7 "2023-06-22T16:38:37Z")

</div>

Great thanks for clarifying.

---

<div class="post-metadata">

**Author:** ![eberfreitas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/eberfreitas/32/640_2.png) [@eberfreitas](https://discourse.flox.dev/u/eberfreitas)\
**Post date:** [March 18, 2024, 9:13pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/8 "2024-03-18T21:13:10Z")

</div>

I’m trying to install MySQL 5.7 but it seems like something has changed and this doesn’t work anymore?

What is the right way of installing old stuff? Here is the version I’m trying to install:

[https://lazamar.co.uk/nix-versions/?package=mysql&version=5.7.39&fullName=mysql-5.7.39&keyName=mysql57&revision=6babc092caf5ed6744d5eb49f7d233dbb3c4f1ef&channel=nixos-22.11#instructions](https://lazamar.co.uk/nix-versions/?package=mysql&version=5.7.39&fullName=mysql-5.7.39&keyName=mysql57&revision=6babc092caf5ed6744d5eb49f7d233dbb3c4f1ef&channel=nixos-22.11#instructions)

Just a heads up, I know zero things about Nix.

Thank you all!

---

<div class="post-metadata">

**Author:** ![ghudgins](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/ghudgins/32/588_2.png) [@ghudgins](https://discourse.flox.dev/u/ghudgins)\
**Post date:** [March 18, 2024, 10:47pm UTC](https://discourse.flox.dev/t/installing-older-version-of-package-than-available/757/9 "2024-03-18T22:47:50Z")

</div>

> it seems like something has changed

This is true, this conversation was referring to an older version.

Right now Flox has a built in search catalog based on Nixpkgs 23.11 (you can read a bit about it here [What is the Flox Catalog? - Flox Docs](https://flox.dev/docs/concepts/packages-and-catalog/) ). This means only the later versions of software are available (and not 5.7 that you are looking for)

We’re aware that this isn’t a great experience (people need specific versions of things!) and we are currently in the process of exposing multiple versions/revisions of Nixpkgs to Flox and broadening the amount of software that is available so you could `flox show mysql` and get a large list of versions hopefully inclusive of the version you’re targeting.

For now this means with Flox you only have later versions of the packages available. I created this tracking ticket to hang this and other tickets off of [Flox search, install, and show by multiple versions · Issue #1197 · flox/flox · GitHub](https://github.com/flox/flox/issues/1197)
