What is the function of the /opt directory? SOLVED

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

What is the function of the /opt directory? SOLVED

#1 Post by pp4mnklinux »

Hello every body:

WHAT is the OPT folder function (located at / ) ??


I ask this because it uses 4 GB and it goes up from time to time.

Can I delete its content??

(thanks a lot for your answers)
Last edited by pp4mnklinux on Fri 14 Sep 2018, 05:46, edited 1 time in total.
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello pp4mnklinux.

/opt is NOT a function, it is a directory. It usually houses big applications
such as Open|LibreOffice, GIMP, sometimes the java-JRE -- and the like.

DO NOT DELETE it or anything in it, or you'll get into big trouble.

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

@ pp4mnklinux:-

Have a look at this HowToGeek article. It explains the layout & function of the Linux file-system 'tree'.....and what each directory is used for:-

https://www.howtogeek.com/117435/htg-ex ... explained/

I'll echo musher0 here; DO NOT DELETE ANY OF THE DIRECTORIES UNDER '/'. You'll break Puppy's back if you do that.


Mike. :wink:

User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

THANKY

#4 Post by pp4mnklinux »

THANKS A LOT FOR YOU ANSWER. I DONT TOUCH THEM... but..... what can I do to reduce the size of my puppy??


Now its 6.6 GB and I think includes software shouldnt use so much.

THANKY
Mike Walsh wrote:@ pp4mnklinux:-

Have a look at this HowToGeek article. It explains the layout & function of the Linux file-system 'tree'.....and what each directory is used for:-

https://www.howtogeek.com/117435/htg-ex ... explained/

I'll echo musher0 here; DO NOT DELETE ANY OF THE DIRECTORIES UNDER '/'. You'll break Puppy's back if you do that.


Mike. :wink:
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

How to keep your Puppy Small but Functional

#5 Post by mikeslr »

Hi pp4mnklinux

"What can I do to reduce the size of my puppy?"

If it ain't broke, don't fix it. :idea:

Keep that in mind as you browse thru this thread: http://www.murga-linux.com/puppy/viewto ... 769#468769

6 Gbs! What percentage of your hard-drive or USB-Key is that?

As musher0 told you, the applications in /opt are usually large. "opt" gets its name from "optional". Traditionally applications which were not essential to the functioning of the base system --not builtin by its creator-- are placed there so that neither they, nor the libraries (nuts & bolts) they require, would conflict with applications which are essential to the base system. /opt is not "on the path". Applications in opt have to be linked to the operating system by executable scripts or symbolic links in a "bin" or "sbin" folder, or by the Exec argument in its /usr/share/applications/THIS_APPLICATION.desktop.

Since they are not "on the path" anyway, they can just as easily be located outside your SaveFile or SaveFolder. [Not so important if you are using a SaveFolder as the same amount of space will be use on your storage-medium either way]. But I prefer SaveFiles and run multiple Puppies and, when possible, do not want to have duplicate files. When possible, I place each "optional" application in its own folder in /mnt/home/Pup-Apps; e.g. /mnt/home/Pup-Apps/firefox. Several Puppies can access that folder. Of course, I then have to create scripts or symbolic links to link them with "the Path" of each Puppy. Some, however, like fredx181's firefox Quantum can by be run by browsing to the "ff" script within the folder and clicking it.

Since you're running Xenialpup64, you might consider replacing some of your applications with AppImages. These also do not occupy "Puppy Space" and are started merely by clicking them.

When possible, prefer SFSes to installed pets. If you are using a SaveFile, when you install a pet it occupies space in your SaveFile. Although a SaveFile is compressed, it is not as compressed as the source (pet or deb) used to install the application. If you are using a SaveFolder, installing an application decompresses it. It will occupy 2 to 3 times the amount of storage space as its source. SFSes remain compressed. Puppies simply reads their files into Random Access Memory as and when needed.

Don't create or store datafiles in "Puppy Space", e.g. /root/my_documents. Move or create them on /mnt/home.

Use wine-portable rather than wine. The former only occupies so much of 'Puppy Space' as is necessary to link it to the operating system. With the exception of portable Windows programs, which can't be installed, windows programs installed into wine occupy 'Puppy Space'. Windows programs installed into wine-portable are merely on your storage medium.

But all of the above are merely just a matter of preference if you are only running one Puppy. With the cost of storage being low (e.g. 3 8Gb USB-Stick for $10) does it really make much difference if your Puppy occupies 2 Gbs or 6 Gbs?

One thing which really does matter is "clearing the cache" websites dump onto your computer. An hour of surfing the web can result in 100 Mbs of information now cached on your computer. This is for the Website's benefit, not yours. The first time you visit a webpage, its information, including images, is transmitted to your computer and stored in cache. The next time, only changes from the last visit have to be transmitted.

With few exceptions, web-browser cache will occupy 'Puppy Space', either in /root/.cache or /root/spot/.cache. Because of how Puppies operate, what's in cache will take up RAM leaving less RAM for you to actually accomplish anything.

Configure your browsers to "clear cache" on exit. History Eraser is a great addon for Google-chrome based browsers for reducing the amount of cache and other junk.
Last edited by mikeslr on Tue 11 Sep 2018, 16:17, edited 1 time in total.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#6 Post by RetroTechGuy »

Where a large /Opt folder causes problems is when you use a savefile -- and run out of space. I have moved mine outside of the save file, then linked it back into the save file (let it fill up space on /mnt/home/).
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#7 Post by bigpup »

The unanswered question. What programs have you installed?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

Re: THANKY

#8 Post by dancytron »

pp4mnklinux wrote:THANKS A LOT FOR YOU ANSWER. I DONT TOUCH THEM... but..... what can I do to reduce the size of my puppy??


Now its 6.6 GB and I think includes software shouldnt use so much.

THANKY
Mike Walsh wrote:@ pp4mnklinux:-

Have a look at this HowToGeek article. It explains the layout & function of the Linux file-system 'tree'.....and what each directory is used for:-

https://www.howtogeek.com/117435/htg-ex ... explained/

I'll echo musher0 here; DO NOT DELETE ANY OF THE DIRECTORIES UNDER '/'. You'll break Puppy's back if you do that.


Mike. :wink:
What browser are you using and what if anything have you done to control the size of its cache (or move its cach outside to /mnt/home)?

Any other programs that have big caches (like google maps) or maybe big data (like blocklists)?

You might try bleachbit and see how much stuff it finds that can be deleted. I'd backup before the first time you use it though.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#9 Post by rufwoof »

My Fatdog savefile is 7MB (I don't save at shutdown, only ever clean boot, make config changes as desired and then save so it keeps the savefile relatively clean). Look to obtain programs as sfs's that you can load/unload as required, and ensure they're unloaded before you run a save. Best to set Event Manager, Save Session Interval to a value of zero (0), i.e. only ever save on demand, but that varies between Puppy versions. Set browser cache to be small (zero if you have fast internet access) or repoint it to /tmp so that its not saved. In Seamonkey that's under Edit, Preferences, Advanced, Cache. In Chrome you can add parameters such as

--disk-cache-dir="/tmp" --disk-cache-size=20971520 for a 20MB cache size (i.e. 20 x 1024 x 1024). Personally I just use --disk-cache-size=1 ... to allocate a 1 byte cache :) i.e. in /usr/share/applications/google-chrome.desktop I have a line that reads

Code: Select all

Exec=google-chrome-spot --disk-cache-size=1 %U
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

SOLVED

#10 Post by pp4mnklinux »

Hello everybody and THANKS:

I read all your answers, and I decided not to modify this file, but I need not to waste space.

The problem was in the disk space. It was only 20gb, because the first time I installed Puppy I used a small 20gb partition, enough for trying this first ISO but small for my actual situation.

So I used AOMEI BACKUP (from Win) I made a copy of this partition and I resized it to 70GB. Then, I restored the image, extend it to use all space and now I have got a bigger partition with my puppy installed on it.


The porcentage of used this is MUCH MORE small, so I feel better.

Puppy is working well and I am going to continue using it this way.

THANKS A LOT FOR YOUR ANSWERS. Have a nice day
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#11 Post by tallboy »

Wow, I have the feeling you are doing something not entirely Puppy related here. The size of partitions you mention, sounds like those necessary for some Windoze setup. :shock: Puppies are tiny creatures! :D
In my /opt directory, I have the Palemoon browser and Thunderbird email programs, there are not many programs normally residing in /opt.

I suggest you take a look at these pages (and the others too!) from the Wikka: (a useful brush-up for all Puppy users now and then! :D )
http://www.puppylinux.org/wikka/ComponentHowTo
http://www.puppylinux.org/wikka/InstallationIndex
http://www.puppylinux.org/wikka/Steps_to_Installation
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#12 Post by RetroTechGuy »

tallboy wrote:Wow, I have the feeling you are doing something not entirely Puppy related here. The size of partitions you mention, sounds like those necessary for some Windoze setup. :shock: Puppies are tiny creatures! :D
In my /opt directory, I have the Palemoon browser and Thunderbird email programs, there are not many programs normally residing in /opt.

I suggest you take a look at these pages (and the others too!) from the Wikka: (a useful brush-up for all Puppy users now and then! :D )
http://www.puppylinux.org/wikka/ComponentHowTo
http://www.puppylinux.org/wikka/InstallationIndex
http://www.puppylinux.org/wikka/Steps_to_Installation
When I first installed Puppy, I used a 2GB flash drive... Which left me about 1.5 GB to work with... ;-)
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

Post Reply