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

I can't re-install packages that fulfill at least one of the following criteria:

  • Custom-made packages
  • Packages created by alien package (e.g. alien --install pkg.rpm)
  • Packages installed from some repository that is no longer available
  • Packages installed from some repository, but is no longer available there
  • Packages whose repositories have been removed from "/etc/apt/sources.list"

How do I list any of these packages?

share|improve this question
up vote 1 down vote accepted

Aptitude lists them under “Obsolete and Locally Created Packages”. The corresponding search pattern is ?obsolete or ~o.

aptitude search '?obsolete'
share|improve this answer

You should be able to list packages installed via alien just by running rpm -qa.

For Debian packages, maybe some combination of apt-cache policy and apt-get autoclean can help?

       Like clean, autoclean clears out the local repository of retrieved
       package files. The difference is that it only removes package files
       that can no longer be downloaded, and are largely useless.
share|improve this answer
autoclean doesn't work as advertised; I guess I must file a bug – Tshepang Feb 7 '11 at 11:51
Does it work after doing apt-get update? – Mikel Feb 7 '11 at 11:52
The command rpm -qa doesn't return anything, even though I have packages installed via alien; Has it worked for you before? – Tshepang Feb 7 '11 at 11:52
Yes, I did an update. – Tshepang Feb 7 '11 at 11:53
I'm not sure. It would make sense if it worked, but I don't have any packages installed using alien that I can test with. – Mikel Feb 7 '11 at 11:53

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.