How to find out information on an installed package
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Is there a method for find out information about an installed package? Such as how it was installed such as via a package manager such as DNF, snap or compiled by the user?
Sometimes I can't remember how I installed a specific package but I always need to include this kind of information in bug reports etc. Is a tool that can provide this kind of information? If not any help in write a script to do this job would be great appreciated.
package-management
add a comment |Â
up vote
0
down vote
favorite
Is there a method for find out information about an installed package? Such as how it was installed such as via a package manager such as DNF, snap or compiled by the user?
Sometimes I can't remember how I installed a specific package but I always need to include this kind of information in bug reports etc. Is a tool that can provide this kind of information? If not any help in write a script to do this job would be great appreciated.
package-management
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Is there a method for find out information about an installed package? Such as how it was installed such as via a package manager such as DNF, snap or compiled by the user?
Sometimes I can't remember how I installed a specific package but I always need to include this kind of information in bug reports etc. Is a tool that can provide this kind of information? If not any help in write a script to do this job would be great appreciated.
package-management
Is there a method for find out information about an installed package? Such as how it was installed such as via a package manager such as DNF, snap or compiled by the user?
Sometimes I can't remember how I installed a specific package but I always need to include this kind of information in bug reports etc. Is a tool that can provide this kind of information? If not any help in write a script to do this job would be great appreciated.
package-management
asked Apr 19 at 11:35
Bprodz
558
558
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You need to ask whatever package manager could have been used - only the package manager stores meta-information about what packages has been installed, and which files are in the package. There's no way to get such information from a naked file.
You didn't say what flavour of distribution you use, but I recommend always using a single package manager (apt for me), and putting stuff that is compiled by the user somewhere else (for me, /usr/local
, managed with stow
, and I keep a list of packages). This way it's easy to find out to which package a particular file belongs.
If you use a dozen package managers or so (why?), you could write a script that queries each of them in turn.
Edit
I keep track of stuff I compiled from source by making a file for each package I compiled in /usr/local/packages/<packagename>
. I need this anyway because it contains information about how I compiled it (often you need to make adjustments, fix a few things that won't compile with a newer gcc etc.) in case I need to compile it again when I upgrade it. And since I have this file, I also add information about where I downloaded the source, what version it is, what it does, what the name of the source tarball is, etc. I keep track of the installed files by installing everything into /usr/local/stow/<packagename>-<version>
(which also sometimes needs adjustments to Makefiles, or ./configure --prefix
, etc.), and then use stow
to make links to it in /usr/local
. I've described this in detail here.
You can also make really deb or rpm packages out of stuff you compile yourself, but this is more work than keeping track of it with stow
.
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
2
This command will print a list with install time / with the last installed rpm package at line 1 :$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
1
And similar for Ubuntu :$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You need to ask whatever package manager could have been used - only the package manager stores meta-information about what packages has been installed, and which files are in the package. There's no way to get such information from a naked file.
You didn't say what flavour of distribution you use, but I recommend always using a single package manager (apt for me), and putting stuff that is compiled by the user somewhere else (for me, /usr/local
, managed with stow
, and I keep a list of packages). This way it's easy to find out to which package a particular file belongs.
If you use a dozen package managers or so (why?), you could write a script that queries each of them in turn.
Edit
I keep track of stuff I compiled from source by making a file for each package I compiled in /usr/local/packages/<packagename>
. I need this anyway because it contains information about how I compiled it (often you need to make adjustments, fix a few things that won't compile with a newer gcc etc.) in case I need to compile it again when I upgrade it. And since I have this file, I also add information about where I downloaded the source, what version it is, what it does, what the name of the source tarball is, etc. I keep track of the installed files by installing everything into /usr/local/stow/<packagename>-<version>
(which also sometimes needs adjustments to Makefiles, or ./configure --prefix
, etc.), and then use stow
to make links to it in /usr/local
. I've described this in detail here.
You can also make really deb or rpm packages out of stuff you compile yourself, but this is more work than keeping track of it with stow
.
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
2
This command will print a list with install time / with the last installed rpm package at line 1 :$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
1
And similar for Ubuntu :$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
add a comment |Â
up vote
1
down vote
accepted
You need to ask whatever package manager could have been used - only the package manager stores meta-information about what packages has been installed, and which files are in the package. There's no way to get such information from a naked file.
You didn't say what flavour of distribution you use, but I recommend always using a single package manager (apt for me), and putting stuff that is compiled by the user somewhere else (for me, /usr/local
, managed with stow
, and I keep a list of packages). This way it's easy to find out to which package a particular file belongs.
If you use a dozen package managers or so (why?), you could write a script that queries each of them in turn.
Edit
I keep track of stuff I compiled from source by making a file for each package I compiled in /usr/local/packages/<packagename>
. I need this anyway because it contains information about how I compiled it (often you need to make adjustments, fix a few things that won't compile with a newer gcc etc.) in case I need to compile it again when I upgrade it. And since I have this file, I also add information about where I downloaded the source, what version it is, what it does, what the name of the source tarball is, etc. I keep track of the installed files by installing everything into /usr/local/stow/<packagename>-<version>
(which also sometimes needs adjustments to Makefiles, or ./configure --prefix
, etc.), and then use stow
to make links to it in /usr/local
. I've described this in detail here.
You can also make really deb or rpm packages out of stuff you compile yourself, but this is more work than keeping track of it with stow
.
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
2
This command will print a list with install time / with the last installed rpm package at line 1 :$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
1
And similar for Ubuntu :$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You need to ask whatever package manager could have been used - only the package manager stores meta-information about what packages has been installed, and which files are in the package. There's no way to get such information from a naked file.
You didn't say what flavour of distribution you use, but I recommend always using a single package manager (apt for me), and putting stuff that is compiled by the user somewhere else (for me, /usr/local
, managed with stow
, and I keep a list of packages). This way it's easy to find out to which package a particular file belongs.
If you use a dozen package managers or so (why?), you could write a script that queries each of them in turn.
Edit
I keep track of stuff I compiled from source by making a file for each package I compiled in /usr/local/packages/<packagename>
. I need this anyway because it contains information about how I compiled it (often you need to make adjustments, fix a few things that won't compile with a newer gcc etc.) in case I need to compile it again when I upgrade it. And since I have this file, I also add information about where I downloaded the source, what version it is, what it does, what the name of the source tarball is, etc. I keep track of the installed files by installing everything into /usr/local/stow/<packagename>-<version>
(which also sometimes needs adjustments to Makefiles, or ./configure --prefix
, etc.), and then use stow
to make links to it in /usr/local
. I've described this in detail here.
You can also make really deb or rpm packages out of stuff you compile yourself, but this is more work than keeping track of it with stow
.
You need to ask whatever package manager could have been used - only the package manager stores meta-information about what packages has been installed, and which files are in the package. There's no way to get such information from a naked file.
You didn't say what flavour of distribution you use, but I recommend always using a single package manager (apt for me), and putting stuff that is compiled by the user somewhere else (for me, /usr/local
, managed with stow
, and I keep a list of packages). This way it's easy to find out to which package a particular file belongs.
If you use a dozen package managers or so (why?), you could write a script that queries each of them in turn.
Edit
I keep track of stuff I compiled from source by making a file for each package I compiled in /usr/local/packages/<packagename>
. I need this anyway because it contains information about how I compiled it (often you need to make adjustments, fix a few things that won't compile with a newer gcc etc.) in case I need to compile it again when I upgrade it. And since I have this file, I also add information about where I downloaded the source, what version it is, what it does, what the name of the source tarball is, etc. I keep track of the installed files by installing everything into /usr/local/stow/<packagename>-<version>
(which also sometimes needs adjustments to Makefiles, or ./configure --prefix
, etc.), and then use stow
to make links to it in /usr/local
. I've described this in detail here.
You can also make really deb or rpm packages out of stuff you compile yourself, but this is more work than keeping track of it with stow
.
edited Apr 20 at 6:16
answered Apr 19 at 11:42
dirkt
14k2930
14k2930
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
2
This command will print a list with install time / with the last installed rpm package at line 1 :$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
1
And similar for Ubuntu :$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
add a comment |Â
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
2
This command will print a list with install time / with the last installed rpm package at line 1 :$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
1
And similar for Ubuntu :$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
Okay I see. Thanks for the info. I didn't mention my distros because I was looking for a 'general' solution (I use Ubuntu/apt and Fedora/dnf). I'm mainly use F27 + dnf, but where no packages are available I need to use snaps or compile from source. I perhaps I'll write a script to ask apt, dnf for info on an argument supplied on the commandline and show whether if matches were found. How do you keep track of stuff that you've complied from source? Is there any way to 'manually' add an entry to a package manager?
â Bprodz
Apr 19 at 11:57
2
2
This command will print a list with install time / with the last installed rpm package at line 1 :
$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
This command will print a list with install time / with the last installed rpm package at line 1 :
$ rpm -qa --last > last-packages.txt
â Knud Larsen
Apr 19 at 16:30
1
1
And similar for Ubuntu :
$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
And similar for Ubuntu :
$ ls -tl /var/lib/dpkg/info | grep list > list-deb.txt
â Knud Larsen
Apr 19 at 16:35
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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%2funix.stackexchange.com%2fquestions%2f438706%2fhow-to-find-out-information-on-an-installed-package%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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');
);
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');
);
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