How to check if my system is clean and how to clean it if not?

For example yesterday I tried to install a package from aur.
There was an error:

yarn run v1.22.4 error Couldn't find a package.json in "/home/jm/.cache/yay/fspy/src"

and installation failed.
Are there any rubbish files that should be removed?
Is yay -Sc enough? Will it only remove AUR cache?
What happens if during installation (normal repositories or AUR) there is an error or for example power failure?

And for system in general
I know that I can do
pacman -Sc
paccache -r or (-ruk0)

For standard package uninstall I do:
pacman -Rsn
It's removing everything with dependences so the system is like before installation?

And if I do:
pacman -S package-xxx
run package-xxx
pacman -Rsn package-xxx

Is there only config in my home directory left or there are files that will exist somewhere in my system?
I understand that if package-xxx would change something in my system settings or it won't be reverted.

Or another example
Recently I wanted to test an usb Wi-Fi dongle based on rtl chipset. It requires package that is on AUR
this package requires dependences:
bc, dkms, git
and manual installation of linux-headers for my kernel

I have bc and git packages already.
If I'll install rtl8812au-dkms-git, use usb dongle and do
pacman -Rsn rtl8812au-dkms-git linux-headers
Will it remove the driver, dkms and make my system like before installation?

:+1: Welcome to Manjaro! :+1:

Holy moly! That's a lot of questions for... well... one question! We don't charge more if you post multiple, narrow questions instead of one question asking for the :first_quarter_moon_with_face:.. :wink:

Also please read this:

and post some more information so we can see what's really going on.


As to how to keep your system "clean", please read this first

1 Like

sudo pacman -Rns $(pacman -Qtdq)

...will remove unnecessary orphans. That's about all I do other than delete my browser caches once in a while.

Note: As a long-term Linux (ab)user, I've noted over the years that an incessant need to keep things sparkling-fresh has led to more ills than good.


pamac remove --orphans is easier to remember... :innocent: :wink:

I also do a:

pamac clean --keep 2

to clean the cached versions of installed software


sudo journalctl --vacuum-time=14d

to clean the journals.

I do these about once per month.


I use Manjaro for 5 or more years :wink:
Long learning curve.

I wanted to 'show' that I'm aware of something, and that I read before asking quetsion :slight_smile:

System:    Kernel: 5.4.33-3-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.4-x86_64 root=UUID=3997469d-f78a-4a25-9f09-46ad910887e5 rw 
           rootflags=subvol=@ quiet udev.log_priority=3 
           Desktop: KDE Plasma 5.18.4 tk: Qt 5.14.2 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASRock model: P67 Pro3 serial: <filter> UEFI: American Megatrends v: P3.30 date: 10/01/2013 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3 serial: <filter> 
           charge: 100% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i5-2500K bits: 64 type: MCP arch: Sandy Bridge family: 6 model-id: 2A (42) 
           stepping: 7 microcode: 2F L2 cache: 6144 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 26413 
           Speed: 1600 MHz min/max: 1600/5900 MHz Core speeds (MHz): 1: 1600 2: 1600 3: 1600 4: 1600 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds mitigation: Clear CPU buffers; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: disabled, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GK110 [GeForce GTX 780] vendor: Gigabyte driver: nvidia v: 440.82 bus ID: 01:00.0 
           chip ID: 10de:1004 
           Display: x11 server: X.Org 1.20.8 driver: nvidia compositor: kwin_x11 tty: N/A 
           OpenGL: renderer: GeForce GTX 780/PCIe/SSE2 v: 4.6.0 NVIDIA 440.82 direct render: Yes 
Audio:     Device-1: NVIDIA GK110 High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           chip ID: 10de:0e1a 
           Device-2: C-Media CMI8788 [Oxygen HD Audio] vendor: ASUSTeK Virtuoso 100 driver: snd_virtuoso v: kernel 
           bus ID: 06:02.0 chip ID: 13f6:8788 
           Sound Server: ALSA v: k5.4.33-3-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8169 v: kernel port: d000 
           bus ID: 03:00.0 chip ID: 10ec:8168 
           IF: enp3s0 state: down mac: <filter> 
           Device-2: Qualcomm Atheros AR9271 802.11n type: USB driver: ath9k_htc bus ID: 1-1.3:3 chip ID: 0cf3:9271 
           serial: <filter> 
           IF: wlp0s26u1u3 state: up mac: <filter> 
Drives:    Local Storage: total: 1.36 TiB used: 169.73 GiB (12.1%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB block size: physical: 512 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: 3B6Q scheme: GPT 
           ID-2: /dev/sdb vendor: Samsung model: HD103SJ size: 931.51 GiB block size: physical: 512 B logical: 512 B 
           speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter> rev: 0001 scheme: GPT 
Partition: ID-1: / raw size: 465.26 GiB size: 465.26 GiB (100.00%) used: 169.73 GiB (36.5%) fs: btrfs dev: /dev/sda2 
           ID-2: /home raw size: 465.26 GiB size: 465.26 GiB (100.00%) used: 169.73 GiB (36.5%) fs: btrfs dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 37.0 C mobo: N/A gpu: nvidia temp: 38 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 17% 
Info:      Processes: 217 Uptime: 20m Memory: 15.61 GiB used: 2.14 GiB (13.7%) Init: systemd v: 244 Compilers: gcc: 9.3.0 
           Shell: bash v: 5.0.16 running in: yakuake inxi: 3.0.37

I started with:
So thank you.

I know. Thank you.

Maybe to simplify.

  1. When I install something
  • from normal repositories
  • from aur
    And then uninstall package. Are there any files left (not in home config and not in cache)?
  1. What is going with files (installation files) during package install when power failure happens?
1 Like

If you use the '--no-save' flag all associated files will be removed, even backups, besides those in your home folder.
sudo pacman -Rns PACKAGE
Things from your home wont be removed. This is good. But can mean you might find an old firefox cache in home after you have uninstalled it.

Depends when the failure happens. Could be a partial or corrupted download. Could be an interruption of writing the files. Depends when.


What package?

You can't run any yarn without a package.json.


Yesterday I used pamac (first time in my life :partying_face:) and it worked.
Pamac didn't create any shortcuts for this software, so I'll probably go with bauh and appimage (tested on another PC and it seems that it's working better than pamac+AUR package)

I started this whole topic especially because of AUR. It was not the first time when something went wrong during installation. I'm not saying that it isn't my fault but one way or another I wanted to know If it is possible that installation with errors can create files that will lay down somewhere on my system without me knowing about them.

read this


One forum cleaning question :slight_smile:

I like to mark topics as solved to keep forum tidy (it seems that cleaning is my thing :joy:)

In this topic there is no direct simple answer so should I just leave it till:

This topic will close a month after the last reply.




This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by