How do I list all packages that no package depends on? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Generating list of manually installed packages and querying individual packagesHow can I list all packages I've installed from a particular repository?dump dpkg package list for fresh installationHow can I mark all packages with installed dependents as “Automatically Installed”?How can I get all the URL of the dependencies of a deb package?Write List of Packages installed via Manual Invocation of apt-get to FileHow are packages classified in apt-mark showauto/showmanual?reverse-depends: looking for reverse dependencies of source packagesHow to correct auto/manual installation flags of installed packages?Where can I find a list of packages that are default to a distribution?E: Broken packages from Depends: python3 (>= 3.6.6-1~)

What LEGO pieces have "real-world" functionality?

What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?

Biased dice probability question

How do you clear the ApexPages.getMessages() collection in a test?

How does modal jazz use chord progressions?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Should you tell Jews they are breaking a commandment?

Does a C shift expression have unsigned type? Why would Splint warn about a right-shift?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

I'm having difficulty getting my players to do stuff in a sandbox campaign

Was credit for the black hole image misattributed?

What do you call the holes in a flute?

Single author papers against my advisor's will?

How to rotate it perfectly?

Simulating Exploding Dice

What would be Julian Assange's expected punishment, on the current English criminal law?

New Order #5: where Fibonacci and Beatty meet at Wythoff

What is the electric potential inside a point charge?

Who can trigger ship-wide alerts in Star Trek?

Problem when applying foreach loop

What is the largest species of polychaete?

What was the last x86 CPU that did not have the x87 floating-point unit built in?

What to do with post with dry rot?

Geometric mean and geometric standard deviation



How do I list all packages that no package depends on?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Generating list of manually installed packages and querying individual packagesHow can I list all packages I've installed from a particular repository?dump dpkg package list for fresh installationHow can I mark all packages with installed dependents as “Automatically Installed”?How can I get all the URL of the dependencies of a deb package?Write List of Packages installed via Manual Invocation of apt-get to FileHow are packages classified in apt-mark showauto/showmanual?reverse-depends: looking for reverse dependencies of source packagesHow to correct auto/manual installation flags of installed packages?Where can I find a list of packages that are default to a distribution?E: Broken packages from Depends: python3 (>= 3.6.6-1~)



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















First, an introduction. I just found a development server with all kinds of GUI packages installed. I'd like to know why. Therefore, I'd like to know which software has been installed that requires X.



I can answer this by answering two closely related questions:



  • How can I list all installed packages that no other package depends on?

  • How can I list all installed packages that no other package depends on, and that, directly or indirectly, depend on a given package? (E.g., x11-common.)

For the first question, apt-mark showmanual is a useful approximation, but it may not be exactly right.



For the second question, what I'm using now postprocesses the apt-rdepends output to list only results for which no dependencies are listed that are listed as results.



Is this correct? Is there an easier way? I notice the result contains quite a few packages that aren't marked as manually installed.



I need this on Ubuntu 14.04, 16.04, and 18.04.










share|improve this question
























  • Why not look at /var/log/apt? You should be able to see the install history there.

    – waltinator
    Feb 1 at 14:13











  • I don't want to pick logfiles apart by hand, I want those packages listed. Besides, by default, those logs don't last forever.

    – Reinier Post
    Feb 1 at 14:15












  • I'm not sure that "all installed packages that no other package depends on" is going to be a very useful list (it's going to include essential "top level" packages such as login for example) but I guess you could parse the output of aptitude why e.g. dpkg --get-selections | while read pkg status; do [[ "$status" == "install" ]] && grep '^Unable to find a reason'; ; done . It will be painfully slow (but you might not care, for a one-off).

    – steeldriver
    Feb 1 at 16:26











  • Just an idea: Automatically installed packages that no other packages depends on, are removed as unused packages by aptitude, provided the options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant are set to false. Or do you also want the manually installed packages that are not depended upon by any other package?

    – Stefan Hamcke
    Feb 1 at 16:50












  • Basically, I want all software that was explicitly installed, rather than as a dependency of something else, even if that something else was installed later. I'm not sure just taking all packages resulting from apt-mark showmanual gives me that.

    – Reinier Post
    Apr 11 at 13:35


















4















First, an introduction. I just found a development server with all kinds of GUI packages installed. I'd like to know why. Therefore, I'd like to know which software has been installed that requires X.



I can answer this by answering two closely related questions:



  • How can I list all installed packages that no other package depends on?

  • How can I list all installed packages that no other package depends on, and that, directly or indirectly, depend on a given package? (E.g., x11-common.)

For the first question, apt-mark showmanual is a useful approximation, but it may not be exactly right.



For the second question, what I'm using now postprocesses the apt-rdepends output to list only results for which no dependencies are listed that are listed as results.



Is this correct? Is there an easier way? I notice the result contains quite a few packages that aren't marked as manually installed.



I need this on Ubuntu 14.04, 16.04, and 18.04.










share|improve this question
























  • Why not look at /var/log/apt? You should be able to see the install history there.

    – waltinator
    Feb 1 at 14:13











  • I don't want to pick logfiles apart by hand, I want those packages listed. Besides, by default, those logs don't last forever.

    – Reinier Post
    Feb 1 at 14:15












  • I'm not sure that "all installed packages that no other package depends on" is going to be a very useful list (it's going to include essential "top level" packages such as login for example) but I guess you could parse the output of aptitude why e.g. dpkg --get-selections | while read pkg status; do [[ "$status" == "install" ]] && grep '^Unable to find a reason'; ; done . It will be painfully slow (but you might not care, for a one-off).

    – steeldriver
    Feb 1 at 16:26











  • Just an idea: Automatically installed packages that no other packages depends on, are removed as unused packages by aptitude, provided the options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant are set to false. Or do you also want the manually installed packages that are not depended upon by any other package?

    – Stefan Hamcke
    Feb 1 at 16:50












  • Basically, I want all software that was explicitly installed, rather than as a dependency of something else, even if that something else was installed later. I'm not sure just taking all packages resulting from apt-mark showmanual gives me that.

    – Reinier Post
    Apr 11 at 13:35














4












4








4








First, an introduction. I just found a development server with all kinds of GUI packages installed. I'd like to know why. Therefore, I'd like to know which software has been installed that requires X.



I can answer this by answering two closely related questions:



  • How can I list all installed packages that no other package depends on?

  • How can I list all installed packages that no other package depends on, and that, directly or indirectly, depend on a given package? (E.g., x11-common.)

For the first question, apt-mark showmanual is a useful approximation, but it may not be exactly right.



For the second question, what I'm using now postprocesses the apt-rdepends output to list only results for which no dependencies are listed that are listed as results.



Is this correct? Is there an easier way? I notice the result contains quite a few packages that aren't marked as manually installed.



I need this on Ubuntu 14.04, 16.04, and 18.04.










share|improve this question
















First, an introduction. I just found a development server with all kinds of GUI packages installed. I'd like to know why. Therefore, I'd like to know which software has been installed that requires X.



I can answer this by answering two closely related questions:



  • How can I list all installed packages that no other package depends on?

  • How can I list all installed packages that no other package depends on, and that, directly or indirectly, depend on a given package? (E.g., x11-common.)

For the first question, apt-mark showmanual is a useful approximation, but it may not be exactly right.



For the second question, what I'm using now postprocesses the apt-rdepends output to list only results for which no dependencies are listed that are listed as results.



Is this correct? Is there an easier way? I notice the result contains quite a few packages that aren't marked as manually installed.



I need this on Ubuntu 14.04, 16.04, and 18.04.







apt dependencies






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 11 at 13:53







Reinier Post

















asked Feb 1 at 13:35









Reinier PostReinier Post

18013




18013












  • Why not look at /var/log/apt? You should be able to see the install history there.

    – waltinator
    Feb 1 at 14:13











  • I don't want to pick logfiles apart by hand, I want those packages listed. Besides, by default, those logs don't last forever.

    – Reinier Post
    Feb 1 at 14:15












  • I'm not sure that "all installed packages that no other package depends on" is going to be a very useful list (it's going to include essential "top level" packages such as login for example) but I guess you could parse the output of aptitude why e.g. dpkg --get-selections | while read pkg status; do [[ "$status" == "install" ]] && grep '^Unable to find a reason'; ; done . It will be painfully slow (but you might not care, for a one-off).

    – steeldriver
    Feb 1 at 16:26











  • Just an idea: Automatically installed packages that no other packages depends on, are removed as unused packages by aptitude, provided the options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant are set to false. Or do you also want the manually installed packages that are not depended upon by any other package?

    – Stefan Hamcke
    Feb 1 at 16:50












  • Basically, I want all software that was explicitly installed, rather than as a dependency of something else, even if that something else was installed later. I'm not sure just taking all packages resulting from apt-mark showmanual gives me that.

    – Reinier Post
    Apr 11 at 13:35


















  • Why not look at /var/log/apt? You should be able to see the install history there.

    – waltinator
    Feb 1 at 14:13











  • I don't want to pick logfiles apart by hand, I want those packages listed. Besides, by default, those logs don't last forever.

    – Reinier Post
    Feb 1 at 14:15












  • I'm not sure that "all installed packages that no other package depends on" is going to be a very useful list (it's going to include essential "top level" packages such as login for example) but I guess you could parse the output of aptitude why e.g. dpkg --get-selections | while read pkg status; do [[ "$status" == "install" ]] && grep '^Unable to find a reason'; ; done . It will be painfully slow (but you might not care, for a one-off).

    – steeldriver
    Feb 1 at 16:26











  • Just an idea: Automatically installed packages that no other packages depends on, are removed as unused packages by aptitude, provided the options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant are set to false. Or do you also want the manually installed packages that are not depended upon by any other package?

    – Stefan Hamcke
    Feb 1 at 16:50












  • Basically, I want all software that was explicitly installed, rather than as a dependency of something else, even if that something else was installed later. I'm not sure just taking all packages resulting from apt-mark showmanual gives me that.

    – Reinier Post
    Apr 11 at 13:35

















Why not look at /var/log/apt? You should be able to see the install history there.

– waltinator
Feb 1 at 14:13





Why not look at /var/log/apt? You should be able to see the install history there.

– waltinator
Feb 1 at 14:13













I don't want to pick logfiles apart by hand, I want those packages listed. Besides, by default, those logs don't last forever.

– Reinier Post
Feb 1 at 14:15






I don't want to pick logfiles apart by hand, I want those packages listed. Besides, by default, those logs don't last forever.

– Reinier Post
Feb 1 at 14:15














I'm not sure that "all installed packages that no other package depends on" is going to be a very useful list (it's going to include essential "top level" packages such as login for example) but I guess you could parse the output of aptitude why e.g. dpkg --get-selections | while read pkg status; do [[ "$status" == "install" ]] && grep '^Unable to find a reason'; ; done . It will be painfully slow (but you might not care, for a one-off).

– steeldriver
Feb 1 at 16:26





I'm not sure that "all installed packages that no other package depends on" is going to be a very useful list (it's going to include essential "top level" packages such as login for example) but I guess you could parse the output of aptitude why e.g. dpkg --get-selections | while read pkg status; do [[ "$status" == "install" ]] && grep '^Unable to find a reason'; ; done . It will be painfully slow (but you might not care, for a one-off).

– steeldriver
Feb 1 at 16:26













Just an idea: Automatically installed packages that no other packages depends on, are removed as unused packages by aptitude, provided the options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant are set to false. Or do you also want the manually installed packages that are not depended upon by any other package?

– Stefan Hamcke
Feb 1 at 16:50






Just an idea: Automatically installed packages that no other packages depends on, are removed as unused packages by aptitude, provided the options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant are set to false. Or do you also want the manually installed packages that are not depended upon by any other package?

– Stefan Hamcke
Feb 1 at 16:50














Basically, I want all software that was explicitly installed, rather than as a dependency of something else, even if that something else was installed later. I'm not sure just taking all packages resulting from apt-mark showmanual gives me that.

– Reinier Post
Apr 11 at 13:35






Basically, I want all software that was explicitly installed, rather than as a dependency of something else, even if that something else was installed later. I'm not sure just taking all packages resulting from apt-mark showmanual gives me that.

– Reinier Post
Apr 11 at 13:35











0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114733%2fhow-do-i-list-all-packages-that-no-package-depends-on%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1114733%2fhow-do-i-list-all-packages-that-no-package-depends-on%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?