Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I know I have some packages ready to be removed if I run apt-get autoremove, but I just want to know which they are, without removing them. How can I list what would be removed without removing them? Alternatively, how can I run the above command and force it to prompt me?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The autoremove function lists the packages to be removed and asks for permission to continue before actually carrying out the operation. If you just want to see what would happen

You can use the -s or --simulate... switches to perform no actions

-s, --simulate, --just-print, --dry-run, --recon, --no-act

       No action; perform a simulation of events that would occur but do
       not actually change the system.

so

apt-get -s autoremove 

should do what you want. There is a --assume-no switch that can be used to force no to any questions asked too e.g.

apt-get autoremove --assume-no

The autoremove function only removes packages that are no-longer needed so you should be safe to run it anyway.

autoremove

       autoremove is used to remove packages that were automatically
       installed to satisfy dependencies for other packages and are now no
       longer needed.
share|improve this answer
    
just perfect: thanks a lot! :) –  Luca Borrione Sep 29 '12 at 15:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.