How can I find obsolete packages?

Post your update and upgrade related errors here
Forum rules
Before you post please read this

How can I find obsolete packages?

Postby TheGreatSudoku on Tue Jan 24, 2012 1:20 pm

Every once in a while I run into packages that require some manual installation with dpkg because at some point I installed an Ubuntu package or two. As this causes problems with the normal flow of upgrading, my question is this. Since all the offending packages so far have contained the string "ubuntu" in the version number is there a way I can grep the database of all the packages installed on my system, searching for the word "ubuntu" so I can see all the packages I need to manually replace at once?
↯Acer Aspire 7730 17" laptop ↝ Intel Core Duo 2.00Ghz x2  4gig DDR2 RAM ⤗ Intel Mobile 4 Graphics ➫ Kernel: 3.2.0-14-liquorix ZEN SMP PREEMPT x86_64  Linux Mint Debian Edition using Sid Repositories ⇨ KDE 4.7.4 ⟿ Installed: 11/23/2010↯
User avatar
TheGreatSudoku
Level 3
Level 3
 
Posts: 149
Joined: Tue Dec 07, 2010 12:05 am

Linux Mint is funded by ads and donations.
 

Re: How can I find obsolete packages?

Postby Fornhamfred on Tue Jan 24, 2012 1:38 pm

One option is just to do a search from the menu of ubuntu and search your computer. This will list all files containing the word ubuntu.
Fornhamfred
Level 6
Level 6
 
Posts: 1134
Joined: Wed Oct 31, 2007 3:38 pm
Location: Suffolk UK

Re: How can I find obsolete packages?

Postby xenopeek on Tue Jan 24, 2012 2:03 pm

This should get you started:
Code: Select all
dpkg -l | grep ubuntu
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14812
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How can I find obsolete packages?

Postby TheGreatSudoku on Tue Jan 24, 2012 7:00 pm

this is what I get back

Code: Select all
$ sudo dpkg -l | grep ubuntu
                                                                 
rc  aptdaemon                                     0.31+bzr506-0ubuntu2            transaction based package management service   
ii  apturl                                        0.4.1ubuntu4.1mint1             install packages using the apt protocol - GTK+ frontend                                                                                                                         
ii  apturl-common                                 0.4.1ubuntu4.1mint1             install packages using the apt protocol - common data                                                                                                                           
ii  fontconfig-config                             2.8.0-2.1ubuntu3                generic font configuration library - configuration                                                                                                                             
ii  gtk2-engines-ubuntulooks                      0.9.12-2                        'ubuntulooks' theme for GTK+ 2.x               
ii  libfontconfig1                                2.8.0-2.1ubuntu3                generic font configuration library - runtime   
ii  libfontconfig1-dev                            2.8.0-2.1ubuntu3                generic font configuration library - development                                                                                                                               
ii  python-sexy                                   0.1.9-1ubuntu3-1mint3           python language bindings for libsexy           
ii  ttf-ubuntu-font-family                        0.69+ufl-0ubuntu1               Ubuntu Font Family, sans-serif typeface hinted for clarity                                                                                                                     

looks like fontconfig could be updated. there also seem to be a few remnants of Mint using Ubuntu packages for aptdaemon/apturl/pyhton-sexy ... Any harm in updating these to the Debian standard?
↯Acer Aspire 7730 17" laptop ↝ Intel Core Duo 2.00Ghz x2  4gig DDR2 RAM ⤗ Intel Mobile 4 Graphics ➫ Kernel: 3.2.0-14-liquorix ZEN SMP PREEMPT x86_64  Linux Mint Debian Edition using Sid Repositories ⇨ KDE 4.7.4 ⟿ Installed: 11/23/2010↯
User avatar
TheGreatSudoku
Level 3
Level 3
 
Posts: 149
Joined: Tue Dec 07, 2010 12:05 am

Re: How can I find obsolete packages?

Postby xenopeek on Wed Jan 25, 2012 2:57 am

I think you can give it a shot. I'd start with checking if any packages are dependent on these ones (for example, for aptdaemon, check with "apt-cache rdepends aptdaemon"). Suggest you keep the current packages (they should be in /var/cache/apt/archives) so you can reinstall them if things go wrong.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14812
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How can I find obsolete packages?

Postby craigevil on Wed Jan 25, 2012 4:43 pm

Open Synaptic and look at the local/obsolete tab.

Other methods:
aptitude purge ~o

apt-get autoremove

or you can use deborphan
deborphan | xargs apt-get -y remove --purge
deborphan --guess-all | xargs apt-get -y remove --purge
deborphan --guess-dev | xargs apt-get -y remove --purge

Warning: Make sure you do not actually need any packages that deborphan or using the aptitude purge ~o would remove.

You can also use debfoster to get rid of packages you do not need/use.
Description-en: Install only wanted Debian packages
debfoster is a wrapper program for apt and dpkg. When first run, it
will ask you which of the installed packages you want to keep
installed.
.
After that, it maintains a list of packages that you want to have
installed on your system. It uses this list to detect packages that
have been installed only because other packages depended on them. If
one of these dependencies changes, debfoster will take notice, and
ask if you want to remove the old package.
.
This helps you to maintain a clean Debian install, without old
(mainly library) packages lying around that aren't used any more.
Debian Sid KDE4.8.4 Kernel 3.4 Thinkpad R40 CPU Pentium M 1.3MHz RAM 2GB ATI Mobility 7500
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list | Debian upgrade script smxi | sysinfo script inxi
craigevil
Level 5
Level 5
 
Posts: 559
Joined: Wed Sep 15, 2010 6:10 am
Location: down the rabbit hole

Re: How can I find obsolete packages?

Postby secipolla on Thu Jan 26, 2012 12:27 pm

craigevil wrote:deborphan --guess-all | xargs apt-get -y remove --purge

This one is particularly troublesome as IIRC it will included any package you manually installed that doesn't have any other one as a dependency (the other two shouldn't give any trouble).
But better is to remove the -y option so it asks for your confirmation (and 'remove --purge' can be substituted simply by 'purge').
secipolla
Level 4
Level 4
 
Posts: 356
Joined: Sun Sep 05, 2010 5:19 pm

Re: How can I find obsolete packages?

Postby TheGreatSudoku on Sat Jan 28, 2012 3:03 am

I'm actually going to leave well enough alone.. after some searching:

getting aptdaemon to the Debian version is a dependency-hell headache I'm not willing to deal with:

[code]
sudoku@amitabha:~$ sudo apt-get install aptdaemon
The following packages have unmet dependencies:
aptdaemon : Depends: python-aptdaemon (= 0.31+bzr506-0ubuntu2) but it is not going to be installed

sudoku@amitabha:~$ sudo apt-get install python-aptdaemon
The following packages have unmet dependencies:
python-aptdaemon : Depends: python (< 2.7) but 2.7.2-10 is to be installed
{/code]

I even tried manually installing the python-aptdaemon package by downloading it from packages.debian.org but still no dice in getting aptdaemon to install after that. I'm not going to downgrade python, nor am I brave enough to dpkg -force the current version of aptdaemon.

The fontconfig, apturl, and python-sexy while not Debian official packages, the ones installed on my system are the same version number as the ones in the sid repository, as such I'm just gonna leave well enough alone.
↯Acer Aspire 7730 17" laptop ↝ Intel Core Duo 2.00Ghz x2  4gig DDR2 RAM ⤗ Intel Mobile 4 Graphics ➫ Kernel: 3.2.0-14-liquorix ZEN SMP PREEMPT x86_64  Linux Mint Debian Edition using Sid Repositories ⇨ KDE 4.7.4 ⟿ Installed: 11/23/2010↯
User avatar
TheGreatSudoku
Level 3
Level 3
 
Posts: 149
Joined: Tue Dec 07, 2010 12:05 am

Re: How can I find obsolete packages?

Postby doktornotor on Sat Jan 28, 2012 4:16 am

Code: Select all
# LC_MESSAGES=C apt-cache policy python-aptdaemon
python-aptdaemon:
  Installed: 0.43+bzr707-1
  Candidate: 0.43+bzr707-1
  Version table:
 *** 0.43+bzr707-1 0
        600 http://ftp.debian.org/debian/ testing/main amd64 Packages
        600 http://ftp.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status
     0.31+bzr506-0ubuntu2 0
        700 http://packages.linuxmint.com/ debian/import amd64 Packages
     0.31+bzr413-1.1 0
        600 http://debian.linuxmint.com/latest/ testing/main amd64 Packages


No problem with that if you actually force the version from Debian, instead of the outdated one from Mint repo.
doktornotor
Level 4
Level 4
 
Posts: 212
Joined: Mon Jan 23, 2012 6:28 pm

Re: How can I find obsolete packages?

Postby TheGreatSudoku on Sat Jan 28, 2012 3:23 pm

thanks, I did successfully (and forcefully) upgrade aptdaemon/python-aptdaemon manully downloading and installing via dpkg.

After installing fontconfig-config, I was able to "dpkg -force-all -i" libfontconfig1 and libfontconfig1-dev to upgrade them to their respective Debian versions as well.

apturl/apturl-common/python-sexy/ttf-ubuntu-font-family are all Ubuntu-maintained packages (i.e. there is no Debian version of these packages) ... I'm hoping the mint repository will provide updates for these as needed.

thanks for everyone's help on un-Ubuntufying my LDME/sid install.
↯Acer Aspire 7730 17" laptop ↝ Intel Core Duo 2.00Ghz x2  4gig DDR2 RAM ⤗ Intel Mobile 4 Graphics ➫ Kernel: 3.2.0-14-liquorix ZEN SMP PREEMPT x86_64  Linux Mint Debian Edition using Sid Repositories ⇨ KDE 4.7.4 ⟿ Installed: 11/23/2010↯
User avatar
TheGreatSudoku
Level 3
Level 3
 
Posts: 149
Joined: Tue Dec 07, 2010 12:05 am

Re: How can I find obsolete packages?

Postby doktornotor on Sat Jan 28, 2012 3:32 pm

TheGreatSudoku wrote:apturl/apturl-common/python-sexy/ttf-ubuntu-font-family are all Ubuntu-maintained packages (i.e. there is no Debian version of these packages) ... I'm hoping the mint repository will provide updates for these as needed.


Well, python-sexy is in oldstable in Debian. :D No point in forcing that, you gain nothing.

TheGreatSudoku wrote:thanks for everyone's help on un-Ubuntufying my LDME/sid install.


Enjoy. :D
doktornotor
Level 4
Level 4
 
Posts: 212
Joined: Mon Jan 23, 2012 6:28 pm

Linux Mint is funded by ads and donations.
 

Return to Update/Upgrade Issues

Who is online

Users browsing this forum: No registered users and 3 guests