I notice that whenever I use the command sudo apt-get -y autoremove
quite a number of packages that I need is on the list to be removed.
After going through some of the posts on this forum, I have the impression that the command removes packages that have been automatically installed. To prevent autoremoval of a package, I will have to mark it as
sudo apt-get install <package-name>
Suppose I have 120 packages earmarked for autoremoval.
How do I mark them as manually installed with a single command?
Store all the packages which are ready for autoremoval in a text file and then run
apt-mark manual
command on those packages to mark it as manually installed.~/Desktop/package.txt
- Contains the package names which are going to set as manually installed.I am not sure you understand what autoremove is suggesting, from the man pages:
http://manpages.ubuntu.com/manpages/saucy/man8/apt-get.8.html
The are already installed, and thue "marked as installed", but they are not required as they are dependencies for packages you have already removed.
You should be able to remove them if you so desire, or leave them if you do not want to remove them.
If you feel you are having a problem, we would need further information about the packages you have installed / removed. Perhaps pastebin the list of packages autoremove wishes to remove?
Well, just do
apt-get -s autoremove
, copy the list of package from the terminal and paste it aftersudo apt-get install
.