I want to setup a new virtual machine with some specified packages (name and version), that are provided.
For example, apache2 in version 2.2.20-1ubuntu1
with all dependencies. Even if there is a new version of this package on the servers this one should be installed.
The solution has to work/scale with multiple (n) "setups". Another virtual machine might need an older version of apache2.
I currently know of some possibilities that install the exact packages, but do not scale that good:
- Copy all required
*.deb
to every virtual machine manually and enter:dpkg -i
... -> Could work, but it is very error-prone. (Manual scripts etc.) - Create and use a new Ubuntu repository for each setup. -> Does not work because I would need n repositories.
- Setup the machine once and copy the VM / create a snapshot. -> Does not work because I would need to store n VMs.
My problem could be labeled as patch management, but I do not want to update my packages to the current version. My goal is to install old packages.
=2.2\*
option as a way to use a wildcard for selecting any available subversion. Thats what I wanted to know but didn't know how to ask :) – ᴍᴇʜᴏᴠ Apr 16 '15 at 14:31sudo
not needed forapt-cache
; andapt-cache policy <pkg>
is a similar alternative too, as a sidenote – creanion Sep 19 '22 at 09:45madison
option on Ubuntu 22.* only shows the current version (and other commands in the answer either return errors or do not work) – TommyPeanuts Nov 26 '23 at 08:18