I'm a user of linux mint debian linux distro which is based on debian testing. Debian testing is a rolling release distro. The testing nature of this distro cause some package updates to be buggy. I'm looking for a way to sort packages by release date. I want to install updates after a mount day released to make sure there is minimum bug. I'm already familiar with a good program named apt-listbugs which show me reported bug before installing a package which help me to find reported bugs.

In short: How I can sort updates based on release date on debian testing?


I think you can do a donwload-only upgrade:

sudo apt-get --download-only dist-upgrade

then check the timestamps of files in /var/cache/apt/archives, these are not, as you can think, the timestamp of download, but the timestamps of the same .deb files on the server.

So remove the files that are too much new (with the help of find, i suggest), and then do a no-download upgrade, that will use the remaining files in the preceding directory:

sudo apt-get --no-download dist-upgrade

Alternatively, you can get the timestamps of upgradable packages from the ls-lR.gz file residing on the server, though also downloading this file amount to 6-7MB. Here is a script to get the ordered list



# get urls of upgradable packages
apt-get --print-uris --yes dist-upgrade |
  awk -F \' '/(ht|f)tp/ { print $2 }' |
  sed -r 's/^.*\///' >local_list

if [[ -s local_list ]]; then

  wget -qN "$server_list_url"

  # sort older packages by time (8th fiels is year)
  zgrep -F -f local_list "$server_list" |
    awk '$8 !~ /:/' |
    sort -k8,8n -k6,6M -k7,7n -k9

  # sort newer packages by time (8th field is hour:min)
  zgrep -F -f local_list "$server_list" |
    awk '$8 ~ /:/' |
    sort -k6,6M -k7,7n -k8,8 -k9
  echo "No package to upgrade" >&2
  • As I said before I don't want to download pckages. I just want to create a list of available updates and their release dates. then sort them based on the release date.
    – user9224
    Jul 23 '11 at 6:13
  • @user9224: I added an alternative in my answer
    – enzotib
    Jul 23 '11 at 19:50

Not sure I understand your question, but you can use wajig for a similar purpose. It's upgrade command creates DEB files of your currently-installed packages (it uses dpkg-repack) which are about to be upgraded. This happens before the upgrade takes place. Here's what the command looks like:

wajig --backup=/path/to/dir upgrade

The resulting packages are placed inside a directory (under "/path/to/dir) whose name is the current date and time.

  • I don't want to download pckages. I just want to create a list of available update packages and their release dates and then sort them based on the release date.
    – user9224
    Jul 23 '11 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.