How can I find obsolete packages?
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
How can I find obsolete packages?
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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- Fornhamfred
- Level 6
- Posts: 1243
- Joined: Wed Oct 31, 2007 3:38 pm
- Location: Suffolk UK
Re: How can I find obsolete packages?
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.
Re: How can I find obsolete packages?
This should get you started:
Code: Select all
dpkg -l | grep ubuntu
Re: How can I find obsolete packages?
this is what I get back
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?
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
Re: How can I find obsolete packages?
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.
Re: How can I find obsolete packages?
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.
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.
Re: How can I find obsolete packages?
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).craigevil wrote:deborphan --guess-all | xargs apt-get -y remove --purge
But better is to remove the -y option so it asks for your confirmation (and 'remove --purge' can be substituted simply by 'purge').
Re: How can I find obsolete packages?
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:
getting aptdaemon to the Debian version is a dependency-hell headache I'm not willing to deal with:
Code: Select all
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.
-
- Level 4
- Posts: 203
- Joined: Mon Jan 23, 2012 6:28 pm
Re: How can I find obsolete packages?
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
Re: How can I find obsolete packages?
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.
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.
-
- Level 4
- Posts: 203
- Joined: Mon Jan 23, 2012 6:28 pm
Re: How can I find obsolete packages?
Well, python-sexy is in oldstable in Debian. No point in forcing that, you gain nothing.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.
Enjoy.TheGreatSudoku wrote: thanks for everyone's help on un-Ubuntufying my LDME/sid install.