You are not logged in.

#1 2013-02-17 11:44:45

maggie
Member
Registered: 2011-02-12
Posts: 255

Safe to rm -rf /usr/share/licenses

I just noticed that graysky added the MIT license file to this package in the AUR. https://aur.archlinux.org/packages/profile-sync-daemon/ It got me thinking why I care about all the files in /usr/share/licenses in general. Is it safe to delete that entire directory? I don't care about them and will nenver read them.

Offline

#2 2013-02-17 11:53:16

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Safe to rm -rf /usr/share/licenses

maggie wrote:

I just noticed that graysky added the MIT license file to this package in the AUR. https://aur.archlinux.org/packages/profile-sync-daemon/ It got me thinking why I care about all the files in /usr/share/licenses in general. Is it safe to delete that entire directory? I don't care about them and will nenver read them.

no, the files are managed by pacman, you shouldn't touch them at all (same can be said for everything in /usr /bin /lib etc.).

Offline

#3 2013-02-17 12:46:24

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Safe to rm -rf /usr/share/licenses

65kid wrote:

no, the files are managed by pacman, you shouldn't touch them at all (same can be said for everything in /usr /bin /lib etc.).

Gotta disagree...

1) You can remove the major ones by removing the licenses package if you have it installed.
2) Utilities like bleachbit are used to commonly remove files owned by packages, so I don't believe there is an inherit danger in doing it yourself.

Real question is: are these files required to run any of their said packages?  Easiest thing you can do is to just tarup that dirtree and delete the files under it.  See if stuff breaks.  Maybe someone else with more knowledge can comment.

Offline

#4 2013-02-17 12:52:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Safe to rm -rf /usr/share/licenses

Why do you want to delete them?  It wouldn't really free up much space.  `du -h` says mine is about 7MB.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2013-02-17 13:03:39

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Safe to rm -rf /usr/share/licenses

graysky wrote:

1) You can remove the major ones by removing the licenses package if you have it installed.

I didn't know about the licenses package - yes, you could remove it, but this would be something entirely different than just doing an rm -rf.

graysky wrote:

2) Utilities like bleachbit are used to commonly remove files owned by packages, so I don't believe there is an inherit danger in doing it yourself.

No idea what bleachbit is, but if it is removing files owned by pacman, it is doing something seriously wrong. Even if it doesn't break stuff, it is pointless because the files will just be recreated on the next package update.

graysky wrote:

Real question is: are these files required to run any of their said packages?

Probably not, but that doesn't change the fact that you shouldn't do it and it is totally pointless.

Offline

#6 2013-02-17 13:10:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Safe to rm -rf /usr/share/licenses

@65kid - Bleachbit is in [extra] and you are correct that it needs to be run frequently.  However, it does an amazing job at keeping the amount of non-critical files off your system.  It does have a UI, but have a cron job call that every week.  On a fresh install for example, it removed >450 MB of bullshit.  I run it like this:

sudo bleachbit --clean system.cache system.localizations system.trash

Here is an example after cleaning up a recent upgrade on one of my headless boxes.

Back on topic: yes, he/she will need to `rm -rf /usr/share/licenses/*` at regular intervals, but that doesn't mean that doing so is seriously wrong or pointless.

Last edited by graysky (2013-02-17 13:44:17)

Offline

Board footer

Powered by FluxBB