It seems that we can use some strange, but working solution.
For such search we can create local chroot environment with older release (Ubuntu 12.04 LTS) and find packages from it. We will use debootstrap
as main component:
sudo apt-get install debootstrap
mkdir ~/precise_chroot
sudo debootstrap --no-check-gpg precise ~/precise_chroot
Then add all repositories from previous LTS releases and select main release. Below are two long commands, copy them completely then paste to the terminal:
cat <<EOF | sudo tee ~/precise_chroot/etc/apt/sources.list
# Ubuntu 12.04 LTS - Precise Pangolin
deb http://archive.ubuntu.com/ubuntu precise main universe multiverse restricted
Ubuntu 10.04 LTS - Lucid Lynx
deb http://old-releases.ubuntu.com/ubuntu lucid main universe multiverse restricted
Ubuntu 8.04 LTS - Hardy Heron
deb http://old-releases.ubuntu.com/ubuntu hardy main universe multiverse restricted
Ubuntu 6.06 LTS - Dapper Drake
deb http://old-releases.ubuntu.com/ubuntu dapper main universe multiverse restricted
EOF
cat <<EOF | sudo tee ~/precise_chroot/etc/apt/apt.conf.d/01ubuntu
APT::Default-Release "precise";
EOF
Then call apt-get update
inside chroot:
sudo chroot ~/precise_chroot/ apt-get update
and try to compare version of some package (Midnight Commander - mc
as example) with apt-cache policy mc
:
$ sudo chroot ~/precise_chroot/ apt-cache policy mc
mc:
Installed: (none)
Candidate: 3:4.8.1-2ubuntu1
Version table:
3:4.8.1-2ubuntu1 0
990 http://archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
3:4.7.0-1ubuntu2 0
500 http://old-releases.ubuntu.com/ubuntu/ lucid/universe amd64 Packages
1:4.6.1-8ubuntu1 0
500 http://old-releases.ubuntu.com/ubuntu/ hardy/universe amd64 Packages
1:4.6.1-1ubuntu2 0
500 http://old-releases.ubuntu.com/ubuntu/ dapper/universe amd64 Packages
Moreover you can download single package with this method by specifying release with -t target_release
option:
$ sudo chroot ~/precise_chroot/ apt-get download mc -t hardy
Get:1 Downloading mc 1:4.6.1-8ubuntu1 [2156 kB]
Fetched 2156 kB in 1s (1174 kB/s)
$ ls precise_chroot/*.deb
precise_chroot/mc_4.6.1-8ubuntu1_amd64.deb
So you got the idea.
Small technical note: the ~/precise_chroot
folder will use about 600 Mb of disk space.
I have tuned this method - we can search for the package which contains known filename:
sudo chroot ~/precise_chroot/ apt-get install -y apt-file
sudo chroot ~/precise_chroot/ apt-file update
Below is example with libicui18n.so.48:
$ sudo chroot ~/precise_chroot/ apt-file search
lib32icu48: /usr/lib32/libicui18n.so.48
lib32icu48: /usr/lib32/libicui18n.so.48.1.1
libicu48: /usr/lib/libicui18n.so.48
libicu48: /usr/lib/libicui18n.so.48.1.1
libicu48-dbg: /usr/lib/debug/usr/lib/libicui18n.so.48.1.1
and know the Ubuntu version of this package:
$ sudo chroot ~/precise_chroot/ apt-cache policy libicu48libicu48:
Installed: (none)
Candidate: 4.8.1.1-3
Version table:
4.8.1.1-3 0
990 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
so it is really powerful and simple.
| | | | | |
That /u/pool folder you find is perfect! It seems to be a place where packages and source files (tar and diffs) are put once released and never removed! This information should, together with the second comment here, be put in a reply, I think! I will confirm this with the test of one package, just some time to do it. But others are welcome to, of course.
– Dedec0 Mar 05 '19 at 18:22chroot
for regular search, usingchdist
tool. – user.dz Nov 06 '20 at 12:28