Gore nehafu yapfuura ndakanyora chinyorwa nezve chimwe chinhu chandaida nezveManjaro, nekuwedzera inowanikwawo pane mamwe maArch Linux based system. Ndiri kutaura nezve mukana wekudzikisa pasuru kune imwe yapfuura vhezheni. Muchikamu izvi zvinogoneka nekuda kwe packet cache yeArch, umo mavhezheni matatu ekupedzisira epakeji yega yega anochengetwa, nekukasira. Chokwadi, izvi zvinonzwika zvakanaka, asi hazvina kunaka kana hard drive yako isina yakawanda yekuchengetedza.
Kusvikira maSSD akachipa sezvaakambove akaita, kana nguva iyoyo ikambosvika, madhiraivha anogona kuva chimwe chezvitatu zvingasarudzwa: zvakakura uye zvinodhura; zviduku uye zvakachipa; kana hybrid, uko kune chikamu SSD uye chikamu HDD. Muchisarudzo chechipiri uye chechitatu tinogona kuva nedambudziko rakafanana, sezvo HDD, iyo inopa imwe nzvimbo yekuchengetedza, tinowanzoisiya kune data uye. isu tinoshandisa iyo SSD kune iyo inoshanda sisitimu. Imo mune idzi kesi dzatinofanira kuramba takatarisa paArch Linux package cache. Uye, kana zvichidiwa, zvichenese.
Bvisa iyo Arch package cache, ibvise kana kuisiya sezvairi
Iyi cache ichachengetedza mavhezheni matatu ekupedzisira epasuru yega yega mu /var/cache/pacman/pkg. Iwe unofanirwa kuiona, nokuti kunyange nemuganhu wevatatu, zvinogona kuitika kuti folda inokura uye inokura kusvikira yabata kana kupfuura 10GB yekuchengetedza, zvichienderana nehuwandu hwepurogiramu yatakaisa. Uye, rangarira, isu tiri kutaura nezve cache, ndiko kuti, chimwe chinhu chiripo kana zvichiitika, asi izvo zvingave zvisingadiwi.
Pacman ine sarudzo yekubvisa mavhezheni ekare kubva kucache. sudo pacman -Sc ichabvisa chete shanduro dzekare uye ichasiya yekupedzisira yatakaisa, kureva pkg yeyatakaisa. Kunyangwe iri sarudzo yePacman, zvinonzi hachisi chinhu chinokurudzirwa, asi gakava ringave rekuti isu hatigone kuita kudzikisa sezvatinofanirwa kuita. Mune ino kesi isu taizofanira kuenda kune zvepamutemo repositori uye sarudza yapfuura vhezheni.
Iyo inodzora izvi kubva mushanduro nhatu dzekupedzisira ndeye paccache, uye tinogona kutorazve nzvimbo nemirairo iyi:
Chinhu chekutanga chingave chekutarisa kuti mangani mapakeji ataisa uye kuona zvavari, mune yangu yakazara 1981 mapakeji ane huremu hwakazara hwe13GB:
sudo ls /var/cache/pacman/pkg/ | wc -l du -sh /var/cache/pacman/pkg/
Kana isu tichida kubvisa ese kunze kwematatu ekupedzisira mapakeji, chimwe chinhu chinowanzo otomatiki asi chingave chisiri kushanda, isu tichanyora:
sudo paccache -r
Kana iwe uchiziva, yapora zvishoma (1.52GB) kwandiri, uye handisi kunetsekana nekutadza kudzokera kushanduro yapfuura, saka ndashandisa sudo pacman -Sc:
Neyekupedzisira, kunze kwe13GB yandaive nayo muArch package cache, Manjaro mune yangu kesi, ndakasara ndine 4GB chete. Ichatibvunza mibvunzo miviri: mune yekutanga, inotibvunza kana tichida kubvisa mapakeji, uye ipapo tinofanira kuti hungu; mune yechipiri inotiudza kubvisa repositories, uye ipapo zviri nani kuti kwete.
Uchiri kuda kudzima zvimwe?
A hard drive inofanira kunge yakashata zvakanyanya kana iwe unofanirwa kuve nezvakawanda zvekuzvivaraidza kuti ucheneswe zvakadzama, asi unogona kuitwa. Murairo waizova sudo paccache -rk 1, iko iyo k inoratidza nhamba yemapakiti ekuchengeta. Kana iwe uchida kubvisa mapakeji ese akatoburitswa, unogona kuzviita nekuraira sudo paccache -ruk0. Kubva pamusoro, iyo u inoratidza mapakeji asina kuiswa.
Kana iwe uchida kudzima cache yese, uye woisiya pa0GB, murairo unenge uri sudo pacman -Scc, asi izvi ndingakurudzira chete mumamiriro ezvinhu akaoma kwatisina nzvimbo pane hard drive. Zvese zvakadzimwa nemirairo yakaburitswa pano hazvigone kudzoserwa.
Automate maitiro
Zvese izvi Arch Linux package cache clearing inogona kuitwa otomatiki, asi nekugadzira faira uye nekuwedzera mitsetse mishoma kwairi. Matanho ekutevera kuita otomatiki iri basa rekuchenesa angave:
- Isu tinovhura terminal uye tinyore:
sudo mkdir /etc/pacman.d/hooks
- Zvino tinonyora uyu mumwe murairo:
sudo nano /etc/pacman.d/hooks/clean_package_cache.hook
- Mukati memupepeti, tinowedzera mitsara iyi:
[Trigger] Kushanda = Kuvandudza Kushanda = Kuisa Kushanda = Bvisa Rudzi = Package Target = * [Action] Tsanangudzo = Kuchenesa pacman cache... When = PostTransaction Exec = /usr/bin/paccache -r
- Tinochengetedza uye tinochengetedza. Kubva zvino zvichienda mberi, iyo cache yepakeji ichacheneswa otomatiki pese Pacman paanoshanda kuvandudza, kuisa kana kubvisa mapakeji.
Uye saka unogona kuwana imwe nzvimbo yakawedzerwa. Zviri pachena kuti kana hard drive yakakura zvakakwana, zviri nani kusiya zvinhu sezvazvakagadzirwa, asi izvi zvingasarudzwa zviripo uye zvinogona kutibvisa mumatambudziko.