How can I list all files which will be installed by an APT package?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.
I wanted to list all files which will be installed by APT package xorg
. In other words: all files which will be installed when I type apt install xorg
. However, apt-file
listed only the immediate files of xorg
- not of its dependencies:
$ apt-file list xorg
xorg: /usr/share/bug/xorg/script
xorg: /usr/share/doc/xorg/changelog.gz
xorg: /usr/share/doc/xorg/copyright
xorg: /usr/share/lintian/overrides/xorg
How can I list all associated files?
(I will add an awful bash
pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file
and therefore very, very slow. I'm looking for a better answer.)
bash shell-script debian ubuntu apt
add a comment |Â
up vote
0
down vote
favorite
This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.
I wanted to list all files which will be installed by APT package xorg
. In other words: all files which will be installed when I type apt install xorg
. However, apt-file
listed only the immediate files of xorg
- not of its dependencies:
$ apt-file list xorg
xorg: /usr/share/bug/xorg/script
xorg: /usr/share/doc/xorg/changelog.gz
xorg: /usr/share/doc/xorg/copyright
xorg: /usr/share/lintian/overrides/xorg
How can I list all associated files?
(I will add an awful bash
pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file
and therefore very, very slow. I'm looking for a better answer.)
bash shell-script debian ubuntu apt
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.
I wanted to list all files which will be installed by APT package xorg
. In other words: all files which will be installed when I type apt install xorg
. However, apt-file
listed only the immediate files of xorg
- not of its dependencies:
$ apt-file list xorg
xorg: /usr/share/bug/xorg/script
xorg: /usr/share/doc/xorg/changelog.gz
xorg: /usr/share/doc/xorg/copyright
xorg: /usr/share/lintian/overrides/xorg
How can I list all associated files?
(I will add an awful bash
pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file
and therefore very, very slow. I'm looking for a better answer.)
bash shell-script debian ubuntu apt
This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.
I wanted to list all files which will be installed by APT package xorg
. In other words: all files which will be installed when I type apt install xorg
. However, apt-file
listed only the immediate files of xorg
- not of its dependencies:
$ apt-file list xorg
xorg: /usr/share/bug/xorg/script
xorg: /usr/share/doc/xorg/changelog.gz
xorg: /usr/share/doc/xorg/copyright
xorg: /usr/share/lintian/overrides/xorg
How can I list all associated files?
(I will add an awful bash
pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file
and therefore very, very slow. I'm looking for a better answer.)
bash shell-script debian ubuntu apt
asked Jun 21 at 0:11
Jayjayyy
1338
1338
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
This is what I'm using right now, but it might be buggy and is definitely not very performant:
apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort
Step-by-step:
Get list of packages which will be installed:
apt-cache depends xorg
Select the "depends" and "recommends" entries:
grep '..(Depends|Recommends): [^<]'
Strip everything except the package name:
sed 's/[^:]*: //'
If the line isn't empty, run apt-file
with each package name:
while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done
apt-file list
returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:
sed 's/[^:]*: //'
Sort lines:
sort
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
This is what I'm using right now, but it might be buggy and is definitely not very performant:
apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort
Step-by-step:
Get list of packages which will be installed:
apt-cache depends xorg
Select the "depends" and "recommends" entries:
grep '..(Depends|Recommends): [^<]'
Strip everything except the package name:
sed 's/[^:]*: //'
If the line isn't empty, run apt-file
with each package name:
while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done
apt-file list
returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:
sed 's/[^:]*: //'
Sort lines:
sort
add a comment |Â
up vote
1
down vote
This is what I'm using right now, but it might be buggy and is definitely not very performant:
apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort
Step-by-step:
Get list of packages which will be installed:
apt-cache depends xorg
Select the "depends" and "recommends" entries:
grep '..(Depends|Recommends): [^<]'
Strip everything except the package name:
sed 's/[^:]*: //'
If the line isn't empty, run apt-file
with each package name:
while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done
apt-file list
returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:
sed 's/[^:]*: //'
Sort lines:
sort
add a comment |Â
up vote
1
down vote
up vote
1
down vote
This is what I'm using right now, but it might be buggy and is definitely not very performant:
apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort
Step-by-step:
Get list of packages which will be installed:
apt-cache depends xorg
Select the "depends" and "recommends" entries:
grep '..(Depends|Recommends): [^<]'
Strip everything except the package name:
sed 's/[^:]*: //'
If the line isn't empty, run apt-file
with each package name:
while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done
apt-file list
returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:
sed 's/[^:]*: //'
Sort lines:
sort
This is what I'm using right now, but it might be buggy and is definitely not very performant:
apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort
Step-by-step:
Get list of packages which will be installed:
apt-cache depends xorg
Select the "depends" and "recommends" entries:
grep '..(Depends|Recommends): [^<]'
Strip everything except the package name:
sed 's/[^:]*: //'
If the line isn't empty, run apt-file
with each package name:
while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done
apt-file list
returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:
sed 's/[^:]*: //'
Sort lines:
sort
answered Jun 21 at 0:12
Jayjayyy
1338
1338
add a comment |Â
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%2f450999%2fhow-can-i-list-all-files-which-will-be-installed-by-an-apt-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