Jump to content

How do i downgrade a pakage on Ubuntu to a version I have not installed before

The only guides for downgrading i have found have centered on you still having the app cached by apt but i do not because this is a new vm installation I need to downgrade mtools to mtools_4.0.18 and i also need to downgrade QEMU to 4.2.0 i am on ubuntu 22.04 if that helps

Link to comment
Share on other sites

Link to post
Share on other sites

If you remembert he previous version number you can use apt-get -t to specify a target version, this needs to be done one package at a time, and you likely need to remove the current package first

sudo apt-get -t=4.0.18 install mtools

sudo apt-get -t=4.2.0 install qemu

If it fails that's because Canonical liekly removed it from the repository (usually done after 30+ days or 3+ versions) can't really blame them for that since disk space is the most expensive part of the cloud.

 

Sources:

man 5 apt_preferences

https://askubuntu.com/questions/138284/how-to-downgrade-a-package-via-apt-get

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, 10leej said:

If you remembert he previous version number you can use apt-get -t to specify a target version, this needs to be done one package at a time, and you likely need to remove the current package first

sudo apt-get -t=4.0.18 install mtools

sudo apt-get -t=4.2.0 install qemu

If it fails that's because Canonical liekly removed it from the repository (usually done after 30+ days or 3+ versions) can't really blame them for that since disk space is the most expensive part of the cloud.

 

Sources:

man 5 apt_preferences

https://askubuntu.com/questions/138284/how-to-downgrade-a-package-via-apt-get

cool thanks but i sadly think my versions are to old to be in the database is there another way to install older packages

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Linus No Beard said:

cool thanks but i sadly think my versions are to old to be in the database is there another way to install older packages

You can compile them from source, or attempt to download the ubuntu deb package from an older ubuntu version and install it.

 

I am curious why you need the older version though. I haven't had an issue with qemu and I've been migrating

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, 10leej said:

You can compile them from source, or attempt to download the ubuntu deb package from an older ubuntu version and install it.

 

I am curious why you need the older version though. I haven't had an issue with qemu and I've been migrating

well i need the older version of mtools because make messed up with .img files not working with FAT32 and QEMU wont boot the .img properly this is all for a custom OS i am making and i have no clue what changes broke the make compilation and QEMU old compilations still work on real hardware so i have no clue

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...
On 7/23/2022 at 2:47 AM, finest feck fips said:

From what year is the old version that you need?

OP answered that in the first post and I have already answered the OPs question in the 2nd post

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, 10leej said:

OP answered that in the first post and I have already answered the OPs question in the 2nd post

They didn't, actually. What year their distribution is from is a totally different matter than the question of in what year the software they want to run came out.

 

On 7/12/2022 at 8:22 PM, 10leej said:

If you remembert he previous version number you can use apt-get -t to specify a target version, this needs to be done one package at a time, and you likely need to remove the current package first

sudo apt-get -t=4.0.18 install mtools

sudo apt-get -t=4.2.0 install qemu

If it fails that's because Canonical liekly removed it from the repository (usually done after 30+ days or 3+ versions) can't really blame them for that since disk space is the most expensive part of the cloud.

 

Sources:

man 5 apt_preferences

https://askubuntu.com/questions/138284/how-to-downgrade-a-package-via-apt-get

Now that I've time to check myself, I've learned that qemu 4.2.0 came out in 2019, three years before Ubuntu 22.04 was released. Which helps make clear that this:
 

Quote

If it fails that's because Canonical liekly removed it from the repository (usually done after 30+ days or 3+ versions)

is nonsense because qemu 4.2.0 has never, ever been in the repos for Ubuntu 22.04, because it was obsolete years before the release process for that version of Ubuntu even started.

 

On 7/12/2022 at 8:49 PM, Linus No Beard said:

well i need the older version of mtools because make messed up with .img files not working with FAT32 and QEMU wont boot the .img properly this is all for a custom OS i am making and i have no clue what changes broke the make compilation and QEMU old compilations still work on real hardware so i have no clue

If you're still around: You probably can't just install those versions of mtools and qemu on Ubuntu 22.04 as native debs, since there will likely be versioning conflicts with other parts of your system. But the desired versions of qemu and mtools can both be installed on your current distro via Nix. If you're trying to use qemu-kvm, there may be compatibility issues with that version of qemu and the version of KVM on your host system, plus quirks related to library paths and whatnot. Feel free to post back if you have specific issues with installing those versions in that way.

Link to comment
Share on other sites

Link to post
Share on other sites

I see the issue has been resolved, but I have one more thing to say about this topic. Often Ubuntu has only one version of a software package such as PostgreSQL or PHP. But FreeBSD often has multiple versions readily available, which is just one of the many advantages of FreeBSD over Ubuntu.

OS: FreeBSD 13.3  WM: bspwm  Hardware: Intel 12600KF -- Kingston dual-channel CL36 @6200 -- Sapphire RX 7600 -- BIOSTAR B760MZ-E PRO -- Antec P6 -- Xilence XP550 -- ARCTIC i35 -- EVO 850 500GB

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/24/2022 at 8:43 PM, finest feck fips said:

They didn't, actually. What year their distribution is from is a totally different matter than the question of in what year the software they want to run came out.

 

Now that I've time to check myself, I've learned that qemu 4.2.0 came out in 2019, three years before Ubuntu 22.04 was released. Which helps make clear that this:
 

is nonsense because qemu 4.2.0 has never, ever been in the repos for Ubuntu 22.04, because it was obsolete years before the release process for that version of Ubuntu even started.

 

If you're still around: You probably can't just install those versions of mtools and qemu on Ubuntu 22.04 as native debs, since there will likely be versioning conflicts with other parts of your system. But the desired versions of qemu and mtools can both be installed on your current distro via Nix. If you're trying to use qemu-kvm, there may be compatibility issues with that version of qemu and the version of KVM on your host system, plus quirks related to library paths and whatnot. Feel free to post back if you have specific issues with installing those versions in that way.

I just found a deb file and used dpkg and it worked

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, finest feck fips said:

That's awesome! Was it statically compiled? I'm kinda surprised it worked

no clue it just worked

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×