LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get autoremove (https://www.linuxquestions.org/questions/debian-26/apt-get-autoremove-756772/)

whittycat 09-21-2009 08:37 AM

apt-get autoremove
 
If I use apt to install new software it always starts by telling me that there are a lot of files that were "automatically installed and no longer required" and suggesting that I should run apt-get autoremove. The trouble is that in the list are files I use all the time like kview and kwifimanager and even gdm which I definitely need because it is gdm that fires up KDE and logs me in.
I don't want to autoremove the files because there may be others that I also need and so the list just gets longer and longer.I am just curious to know why apt behaves in this way; why does it think they are no longer required?

~sHyLoCk~ 09-21-2009 09:30 AM

Weird, I only experienced this when I installed something and removed it later, all the dependencies that were installed alongwith those packages "were no longer required" hence it gave me that warning.

highfructose327 09-21-2009 10:30 AM

If you have used aptitude to install some packages you can try
Quote:

sudo aptitude keep-all
I saw this at this link http://ubuntuforums.org/archive/inde...t-1014938.html

whittycat 09-21-2009 10:53 AM

Thanks for the ubuntu forum link. apt doesn't remove them it just invites me to if I want. Since I don't know what I need and what I don't I think I'll just keep them all and stop worrying about it.

tredegar 09-21-2009 12:21 PM

apt keeps a cache of the files it used to install stuff.

Once the stuff is installed, they really aren't needed. You might like to look in
/var/cache/apt/archives to see what is there.

Also, if kview version 1.01 is updated to version 1.02, then you don't really need to keep the installation files for version 1.01.

But, if you have plenty of disk space, you can safely just ignore apt's suggestions (I do).

AwesomeMachine 09-22-2009 02:13 AM

Use deborphan.

sudo apt-get install deborphan
sudo deborphan | sudo xargs dpkg --purge "$1"

Keep running the second command until it doesn't find anything more to remove. Apt-get autoremove needs a little work.


All times are GMT -5. The time now is 02:26 PM.