Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 2181  / 3 Years ago, sun, september 19, 2021, 7:12:11

I have a bunch of shared libs installed on my system which aren't dependencies of some concrete package but are needed for non-apt-managed libraries I've built from source (like latest SDL, Allegro, SFML, ...) and other software built from source. The problem is that those libraries are seen by APT as unused, and are therefore candidates for auto-removal, and those get mixed up with legitimate unused packages that are free to remove.



Is there a way to mark packages as used so that they are not suggested for auto-removal? My first thought was to build my own metapackage just to hold the dependencies (like for example ubuntu-desktop is), but I don't know how to do that.


More From » apt

 Answers
3

Although apt-get install marks packages as installed too, it does other things like upgrading packages (if there is an upgrade available). The correct program to change the automatically-installed states is apt-mark.



Usage



Marking a package as manually installed (such that it won't be removed by apt-get autoremove):



sudo apt-mark manual package1 package2 ... packageN


To mark a package as automatically installed (such that it will be removed by apt-get autoremove if no packages depend on it):



sudo apt-mark auto package1 package2 ... packageN


More details are available in the manual page apt-mark(8).


[#37685] Monday, September 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
throecember

Total Points: 274
Total Questions: 118
Total Answers: 132

Location: India
Member since Thu, Jun 11, 2020
4 Years ago
;