Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my Debian server, I upgraded the SQLite package to version 3.7.7 but discovered that it contains a critical bug that breaks several things including my Subversion repository. So, I would like to downgrade back to the previous version I was using. But:

  • I have no idea what that version was (I assume it was, but I'm not certain).
  • The only other version I find available for the SQLite package in aptitude is which is too early for the Subversion package I'm using (it requires at least 3.6).

How can I identify and downgrade to the version of SQLite I was using, and which might still be in a cache on my computer? Or, failing that, how can I tell aptitude where to download intermediate versions of that package?

share|improve this question
up vote 7 down vote accepted

The APT cache lives in /var/cache/apt/archives. If you have a suitable version of the package there, you can install it with dpkg -i /var/cache/apt/archives/sqlite3-VERSION.deb.

If you don't have it, testing currently has (downloadable from any Debian mirror) and stable currently has 3.7.3-1; or you can find (almost) any version that's ever been in Debian on snapshot.debian.org. Since this is a punctual need, it'll be easiest to download the package manually and install with dpkg (but you can also define a particular snapshot date as an APT source, as explained on the snapshot.d.o home page).

You can find out what version used to be installed by looking through the dpkg logs in /var/log/dpkg.log or the APT logs in /var/log/apt or the Aptitude logs in /var/log/aptitude.

In Aptitude, mark the buggy version as forbidden to install: F key in the interactive UI or aptitude forbid-version interactively. If the bug isn't fixed in the next release, mark the package as “on hold” to prevent automatic upgrades until further notice (= key or aptitude hold command).

share|improve this answer
This worked with only two minor changes (looking for libsqlite, and the amd64 platform). dpkg -i was indeed the fastest way. – Victor Nicollet Jun 27 '11 at 17:22

the file /var/log/dpkg.log has the change history. Please do a grep on this to find your answer.

share|improve this answer
This does indeed confirm that I was running Now, I need to find it :-) – Victor Nicollet Jun 27 '11 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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