How to find reason for orphaned packages in apt-get autoremove?

Clash Royale CLAN TAG#URR8PPP up vote
3
down vote
favorite
In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?
apt package-management
add a comment |Â
up vote
3
down vote
favorite
In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?
apt package-management
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?
apt package-management
In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?
apt package-management
apt package-management
asked Aug 5 '17 at 10:50
bluenote10
906819
906819
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
Automatically:
One of the solutions is to use aptitude, first install it:
sudo apt install aptitude
Now to find out why a package has been installed on your Ubuntu you can run:
aptitude why pkgname
However note that:
The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".
Also:
aptitude whydoes not perform full dependency resolution; it only displays
direct relationships between packages.
In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.
Manually
First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:
sudo apt install vlc
after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:
libqt5x11extras5 vlc-bin vlc-plugin-qt ...
let's first check one of them using aptitude:
$ aptitude why libqt5x11extras5
aptitude why libqt5x11extras5
i xorg Depends xterm | x-terminal-emulator
p qterminal Provides x-terminal-emulator
however the other one because of a direct dependency chain will work fine:
$ aptitude why vlc-bin
c vlc Depends vlc-bin
pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.
Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:
$ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'
using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:
ii libqt5x11extras5
ii vlc-plugin-qt
see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:
$ aptitude why vlc-plugin-qt
c vlc
and we came back to the vlc.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
Automatically:
One of the solutions is to use aptitude, first install it:
sudo apt install aptitude
Now to find out why a package has been installed on your Ubuntu you can run:
aptitude why pkgname
However note that:
The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".
Also:
aptitude whydoes not perform full dependency resolution; it only displays
direct relationships between packages.
In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.
Manually
First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:
sudo apt install vlc
after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:
libqt5x11extras5 vlc-bin vlc-plugin-qt ...
let's first check one of them using aptitude:
$ aptitude why libqt5x11extras5
aptitude why libqt5x11extras5
i xorg Depends xterm | x-terminal-emulator
p qterminal Provides x-terminal-emulator
however the other one because of a direct dependency chain will work fine:
$ aptitude why vlc-bin
c vlc Depends vlc-bin
pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.
Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:
$ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'
using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:
ii libqt5x11extras5
ii vlc-plugin-qt
see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:
$ aptitude why vlc-plugin-qt
c vlc
and we came back to the vlc.
add a comment |Â
up vote
4
down vote
accepted
Automatically:
One of the solutions is to use aptitude, first install it:
sudo apt install aptitude
Now to find out why a package has been installed on your Ubuntu you can run:
aptitude why pkgname
However note that:
The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".
Also:
aptitude whydoes not perform full dependency resolution; it only displays
direct relationships between packages.
In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.
Manually
First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:
sudo apt install vlc
after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:
libqt5x11extras5 vlc-bin vlc-plugin-qt ...
let's first check one of them using aptitude:
$ aptitude why libqt5x11extras5
aptitude why libqt5x11extras5
i xorg Depends xterm | x-terminal-emulator
p qterminal Provides x-terminal-emulator
however the other one because of a direct dependency chain will work fine:
$ aptitude why vlc-bin
c vlc Depends vlc-bin
pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.
Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:
$ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'
using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:
ii libqt5x11extras5
ii vlc-plugin-qt
see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:
$ aptitude why vlc-plugin-qt
c vlc
and we came back to the vlc.
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
Automatically:
One of the solutions is to use aptitude, first install it:
sudo apt install aptitude
Now to find out why a package has been installed on your Ubuntu you can run:
aptitude why pkgname
However note that:
The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".
Also:
aptitude whydoes not perform full dependency resolution; it only displays
direct relationships between packages.
In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.
Manually
First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:
sudo apt install vlc
after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:
libqt5x11extras5 vlc-bin vlc-plugin-qt ...
let's first check one of them using aptitude:
$ aptitude why libqt5x11extras5
aptitude why libqt5x11extras5
i xorg Depends xterm | x-terminal-emulator
p qterminal Provides x-terminal-emulator
however the other one because of a direct dependency chain will work fine:
$ aptitude why vlc-bin
c vlc Depends vlc-bin
pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.
Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:
$ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'
using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:
ii libqt5x11extras5
ii vlc-plugin-qt
see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:
$ aptitude why vlc-plugin-qt
c vlc
and we came back to the vlc.
Automatically:
One of the solutions is to use aptitude, first install it:
sudo apt install aptitude
Now to find out why a package has been installed on your Ubuntu you can run:
aptitude why pkgname
However note that:
The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".
Also:
aptitude whydoes not perform full dependency resolution; it only displays
direct relationships between packages.
In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.
Manually
First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:
sudo apt install vlc
after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:
libqt5x11extras5 vlc-bin vlc-plugin-qt ...
let's first check one of them using aptitude:
$ aptitude why libqt5x11extras5
aptitude why libqt5x11extras5
i xorg Depends xterm | x-terminal-emulator
p qterminal Provides x-terminal-emulator
however the other one because of a direct dependency chain will work fine:
$ aptitude why vlc-bin
c vlc Depends vlc-bin
pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.
Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:
$ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'
using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:
ii libqt5x11extras5
ii vlc-plugin-qt
see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:
$ aptitude why vlc-plugin-qt
c vlc
and we came back to the vlc.
answered Aug 5 '17 at 11:20
Ravexina
28.4k146897
28.4k146897
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f943287%2fhow-to-find-reason-for-orphaned-packages-in-apt-get-autoremove%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password