-
Notifications
You must be signed in to change notification settings - Fork 3
/
linux.yaml
3447 lines (3076 loc) · 231 KB
/
linux.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
os: linux
scripting:
language: shellscript
startCode: |-
#!/usr/bin/env bash
# {{ $homepage }} — v{{ $version }} — {{ $date }}
if [ "$EUID" -ne 0 ]; then
script_path=$([[ "$0" = /* ]] && echo "$0" || echo "$PWD/${0#./}")
sudo "$script_path" || (
echo 'Administrator privileges are required.'
exit 1
)
exit 0
fi
export HOME="/home/${SUDO_USER:-${USER}}" # Keep `~` and `$HOME` for user not `/root`.
endCode: |-
echo 'Your privacy and security is now hardened 🎉💪'
echo 'Press any key to exit.'
read -n 1 -s
actions:
- category: Privacy cleanup
docs: |-
These scripts allow you to increase privacy by deleting collected data about you and your behavior.
children:
- category: Clear terminal history
docs: |-
Reading terminal history is one of the attack techniques.
The existence of bash history files is defined as an unsecured credential attack technique by MITRE [1].
[1]: https://web.archive.org/web/20221029134827/https://attack.mitre.org/techniques/T1552/003/ "Unsecured Credentials: Bash History, Sub-technique T1552.003 - Enterprise | MITRE ATT&CK® | attack.mitre.org"
children:
- name: Clear bash history
recommend: strict
docs: |-
Bash (Bourne-Again SHell) is from the GNU project.
It is used by most distributions as their default shell.
See also [GNU Bash Homepage](https://web.archive.org/web/20221029211839/https://www.gnu.org/software/bash/).
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .bash_history
- name: Clear Zsh history
recommend: strict
docs: |-
Zsh is also known as Z-shell [1]. See its [homepage](https://web.archive.org/web/20221029211848/https://www.zsh.org/) for more information.
It is one of the most used shells and has been the default shell in Kali Linux since 2020.4 [2].
Arch Linux installer uses zsh [3] but sets bash on disk as default [4].
[1]: https://web.archive.org/web/20221029134900/https://en.wikipedia.org/wiki/Z_shell "Z shell - Wikipedia | wikipedia.org"
[2]: https://web.archive.org/web/20221029134925/https://www.kali.org/blog/kali-linux-2020-4-release/ "Kali Linux 2020.4 Release (ZSH, Bash, CME, MOTD, AWS, Docs, Win-KeX & Vagrant) | Kali Linux Blog | kali.org"
[3]: https://web.archive.org/web/20221029181441/https://gitlab.archlinux.org/archlinux/archiso/-/blob/9f16862acd7e7be02da72f63a03b4c0e256dabff/configs/releng/packages.x86_64#L32 "configs/releng/packages.x86_64 · 9f16862acd7e7be02da72f63a03b4c0e256dabff · Arch Linux / archiso · GitLab"
[4]: https://web.archive.org/web/20221029181616/https://wiki.archlinux.org/title/bash "Bash - ArchWiki"
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .zsh_history
- name: Clear tcsh history
recommend: strict
docs: |-
C shell (csh) with file name completion and command line editing.
`~/.history` is its default histfile (history file) [1].
It's shipped by FreeBSD as the default root shell [2].
See also:
- [tcsh homepage](https://web.archive.org/web/20221029211930/https://www.tcsh.org/),
- [tcsh source code](https://web.archive.org/web/20221029212024/https://github.com/tcsh-org/tcsh).
[1]: https://web.archive.org/web/20221029134950/https://linux.die.net/man/1/tcsh "tcsh(1) - Linux man page | linux.die.net"
[2]: https://web.archive.org/web/20221029135041/https://books.google.com/books?id=LyDP5b2xzaMC&pg=PA56 "Sams Teach Yourself FreeBSD in 24 Hours - Michael Urban, Brian Tiemann - Google Books | books.google.com"
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .history
- name: Clear fish history
recommend: strict
docs: |-
It is one of the most popular exotic shells that favors usability over standard compliance.
Its history file is stored in `~/.local/share/fish/fish_history` and `~/.config/fish/fish_history` [1].
It is used by PEUX OS as the default shell [2].
See also [fish shell homepage](https://web.archive.org/web/20221029212109/https://fishshell.com/) for more information.
[1]: https://web.archive.org/web/20221029135026/https://github.com/fish-shell/fish-shell/issues/862 "history file location · Issue #862 · fish-shell/fish-shell | github.com/fish-shell"
[2]: https://web.archive.org/web/20221029135110/https://peux-os.netlify.app/ "Homepage of Peux OS | [POS] | peux-os.netlify.app"
call:
- # >= 2.3.0
function: DeleteFileFromUserAndRootHome
parameters:
file: .local/share/fish/fish_history
- # < 2.3.0
function: DeleteFileFromUserAndRootHome
parameters:
file: .config/fish/fish_history
- name: Clear KornShell (ksh) history
recommend: strict
docs: |-
KornShell is a shell that has different versions by different maintainers and developers such as `ksh93+u`, `ksh93v-, and `ksh2020`.
The latest maintained version is `ksh93u+m`, see its [GitHub repository (ksh93/ksh)](https://web.archive.org/web/20221029212509/https://github.com/ksh93/ksh).
Its history file (histfile) is saved at `~/.sh_history` by default [1] [2].
OpenBSD symlinks sh to ksh [3].
See also the [Wikipedia page](https://web.archive.org/web/20221029212931/https://en.wikipedia.org/wiki/KornShell) for more information.
[1]: https://web.archive.org/web/20221029135158/https://www.mkssoftware.com/docs/man1/history.1.asp "history -- display KornShell command history | manpage | mkssoftware.com"
[2]: https://web.archive.org/web/20221029135207/https://www.ibm.com/docs/en/aix/7.2?topic=commands-korn-shell-posix-shell-command-history "Korn shell or POSIX shell command history - IBM Documentation | ibm.com"
[3]: https://web.archive.org/web/20221029135300/https://www.reddit.com/r/unix/comments/6zqyl1/nix_distros_with_default_shells/ "*nix distros with default shells? | Reddit (/r/unix) | reddit.com"
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .sh_history
# -
# Dash [1] (used by Debian, Ubuntu, Void Linux etc.) does not support history [2].
# [1]: https://web.archive.org/web/20221029135301/https://git.kernel.org/pub/scm/utils/dash/dash.git
# [2]: https://web.archive.org/web/20221029135344/https://unix.stackexchange.com/questions/271595/how-can-i-access-the-history-buffer-in-sh-not-in-bash
- name: Clear ash history
recommend: strict
docs: |-
It's also known as Almquist shell [1].
It's mainly a fork of dash (Debian Almquist shell) used in embedded Linux distributions such as DSLinux,
Alpine Linux, Tiny Core Linux and Linux-based router firmware such as OpenWrt, Tomato and DD-WRT [1].
It was also used by Android until Android 4.0 [2].
It uses `~/.ash_history` as the history file [3].
[1]: https://web.archive.org/web/20221030142637/https://en.wikipedia.org/wiki/Almquist_shell#Embededed_Linux "Almquist shell - Wikipedia | wikipedia.org"
[2]: https://web.archive.org/web/20221029135416/https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md "Android's shell and utilities | android.googlesource.com"
[3]: https://web.archive.org/web/20221029135513/https://github.com/brgl/busybox/blob/abbf17abccbf832365d9acf1c280369ba7d5f8b2/shell/ash.c#L13626 "busybox/ash.c source code | github.com/brgl/busybox"
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .ash_history
- name: Clear crosh history
recommend: strict
docs: |-
crosh is also known as ChromiumOS shell [1].
It is used in Chromium OS [2].
The history file is found in `~/.crosh_history` by default.
See its [source code (chromiumos/platform2)](https://web.archive.org/web/20221029135520/https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/crosh) for more information.
[1]: https://web.archive.org/web/20221029135520/https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/crosh "crosh git repository | chromium.googlesource.com"
[2]: https://web.archive.org/web/20221029135620/https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/crosh/README.md "README.md file | crosh git repository | chromium.googlesource.com"
[3]: https://web.archive.org/web/20221029135627/https://chromium.googlesource.com/chromiumos/platform2/+/183c7e421bd3a55c757b33b639201555b9d7a283/crosh/crosh#154 "histfile source code | crosh git repository | chromium.googlesource.com"
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .crosh_history
- category: Clear third-party application data
docs: |-
Scripts in this category clear data for third-party applications installed on the operating system.
Third-party applications are not typically distributed as part of the operating system and are
installed separately.
children:
- name: Clear Steam cache
docs: |-
Steam is a video game digital distribution service and storefront by Valve [1].
Clearing Steam cache is safe without any side effects. This may resolve issues with Steam and help you save
space and increase privacy, but may lead to a single-time application performance decrease due to cache renewal.
See also: [Steam Homepage](https://web.archive.org/web/20221029212925/https://store.steampowered.com/)
[1]: https://web.archive.org/web/20221029135718/https://en.wikipedia.org/wiki/Steam_%28service%29 "Steam | Wikipedia | wikipedia.org"
code: |-
# Global installation
rm -rfv ~/.local/share/Steam/appcache/*
# Snap
rm -rfv ~/snap/steam/common/.cache/*
rm -rfv ~/snap/steam/common/.local/share/Steam/appcache/*
# Flatpak
rm -rfv ~/.var/app/com.valvesoftware.Steam/cache/*
rm -rfv ~/.var/app/com.valvesoftware.Steam/data/Steam/appcache/*
- name: Clear Clementine cache
docs: |-
Clementine is a free and open-source audio player [1].
Cover art, moodbar, and network cache are all part of Clementine cache [2].
Clementine cache is kept in the global XDG spec (`~/.cache`) folder [3].
See also: [Clementine Homepage](https://web.archive.org/web/20221029213331/https://www.clementine-player.org/)
[1]: https://web.archive.org/web/20221029135732/https://en.wikipedia.org/wiki/Clementine_%28software%29 "Clementine | Wikipedia | wikipedia.org"
[2]: https://web.archive.org/web/20221029135808/https://github.com/clementine-player/Clementine/blob/7e48b78c158116166348502fd1da5116a2a480bf/src/core/utilities.cpp#L365-L391 "Clementine cache source code | GitHub | github.com/clementine-player/Clementine"
[3]: https://web.archive.org/web/20221029135834/https://github.com/clementine-player/Clementine/issues/3265 "Cache folder · Issue #3265 · clementine-player/Clementine | GitHub | github.com/clementine-player/Clementine"
code: |-
# Global installation
rm -rfv ~/.cache/Clementine/*
# Flatpak installation
rm -rfv ~/.var/app/org.clementine_player.Clementine/cache/*
# Snap installation
rm -rfv ~/snap/clementine/common/.cache/*
- category: Clear Wine data
docs: |-
Wine is a compatibility layer capable of running Windows applications [1].
See also: [Wine Homepage](https://web.archive.org/web/20221029213416/https://www.winehq.org/).
[1]: https://web.archive.org/web/20221029135913/https://en.wikipedia.org/wiki/Wine_%28software%29 "Wine | Wikipedia | en.wikipedia.org"
children:
- name: Clear Wine cache
recommend: standard
docs: |-
Wine has two different caches:
1. Temporary Windows files. Wine saves temporary Windows files at `<wine folder>/drive_c/windows/temp/` [1] [2].
2. Temporary Wine application cache [3] that is not connected to inner Windows files.
[1]: https://web.archive.org/web/20180328090608/http://www.zdnet.com/article/keeping-temp-folders-clean/ "Keeping temp folders clean | ZDNet | dnet.com"
[2]: https://web.archive.org/web/20221029135944/https://ubuntuforums.org/showthread.php?t=1006132 "Why does Wine have its own temp folders? | UbuntuForums | ubuntuforums.org"
[3]: https://web.archive.org/web/20221029135955/https://wiki.debian.org/Wine#Mono_and_Gecko "Wine - Debian Wiki | wiki.debian.org"
code: |-
# Temporary Windows files for global prefix
rm -rfv ~/.wine/drive_c/windows/temp/*
# Wine cache:
rm -rfv ~/.cache/wine/
- name: Clear Winetricks downloads cache
recommend: standard
docs: |-
Winetricks is a helper script to download and install various redistributable runtime libraries
needed to run some programs in Wine [1].
Winetricks cache includes downloaded files cache (runtime libraries/directories).
It caches downloads `winetrickscache/$packagename` [2] [3].
User data cache is stored in `$XDG_CACHE_HOME/winetricks` (by default, `~/.cache/winetricks`) [4].
[1]: https://web.archive.org/web/20221029140111/https://wiki.winehq.org/Winetricks "Winetricks - WineHQ Wiki | wiki.winehq.org"
[2]: https://web.archive.org/web/20221029140047/https://github.com/Winetricks/winetricks/blob/164d243e1384ba7cc6058a6524c1472100b7722c/src/winetricks#L1269-L1271 "Wine source code | GitHub | github.com/Winetricks/winetricks"
[3]: https://web.archive.org/web/20221029140047/https://github.com/Winetricks/winetricks/blob/164d243e1384ba7cc6058a6524c1472100b7722c/src/winetricks#L1515-L1517 "Wine source code | GitHub | github.com/Winetricks/winetricks"
[4]: https://web.archive.org/web/20221029140204/https://manpages.debian.org/experimental/winetricks/winetricks.1.en.html#XDG_CACHE_HOME "winetricks man page | Debian Manpages | manpages.debian.org"
code: rm -rfv ~/.cache/winetricks/
- name: Clear LibreOffice usage history
recommend: strict
docs: |-
LibreOffice is a free and open-source office productivity software suite, a project of The Document Foundation (TDF) [1].
`registrymodifications.xcu` is an XML file that contains the user-specified settings [2].
It is found inside the user settings directory (`~/.config/libreoffice/4/user`) [2].
It includes thumbnails generated [3], and a recent document list [4].
See also: [LibreOffice Homepage](https://web.archive.org/web/20221029214216/https://www.libreoffice.org/).
[1]: https://web.archive.org/web/20221029140306/https://en.wikipedia.org/wiki/LibreOffice "LibreOffice | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029140313/https://wiki.documentfoundation.org/images/b/b0/LibreOffice_config_extension_writing.pdf "Config specification | LibreOffice documentation | wiki.documentfoundation.org"
[3]: https://web.archive.org/web/20221029140438/https://askubuntu.com/questions/996397/where-are-libre-office-thumbnails-stored/996528 "Where are Libre Office thumbnails stored? | Ask Ubuntu Forums | askubuntu.com"
[4]: https://web.archive.org/web/20221029140501/https://forum.openoffice.org/en/forum/viewtopic.php?f=6&t=102020 "Restoring Recent documents list < Apache OpenOffice Community Forum | forum.openoffice.org"
code: |-
# Global installation
rm -f ~/.config/libreoffice/4/user/registrymodifications.xcu
# Snap package
rm -fv ~/snap/libreoffice/*/.config/libreoffice/4/user/registrymodifications.xcu
# Flatpak installation
rm -fv ~/.var/app/org.libreoffice.LibreOffice/config/libreoffice/4/user/registrymodifications.xcu
- category: Clear Thunderbird data
docs: |-
Mozilla Thunderbird is a free and open-source cross-platform email client, personal information manager, news client, RSS and chat
client developed by the Mozilla Foundation [1].
See also: [Thunderbird Homepage | thunderbird.net](https://web.archive.org/web/20221029214240/https://www.thunderbird.net/en-US/).
Read about the files and folders in the profile folder in depth:
[Files and folders in the profile - Thunderbird | kb.mozillazine.org](https://web.archive.org/web/20221029140819/https://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird).
[1]: https://web.archive.org/web/20221029140516/https://en.wikipedia.org/wiki/Mozilla_Thunderbird "Thunderbird | Wikipedia | en.wikipedia.org"
children:
- name: Clear Thunderbird cookies
docs: |-
Thunderbird stores cookie information in [1]:
- `cookies.sqlite`: Stores all cookies.
- `cookies.sqlite-journal`: The journal file for `cookies.sqlite`.
- `cookies.sqlite-shm`, `cookies.sqlite-wal`: Write-ahead log files for `cookies.sqlite`.
The file `cookies.sqlite` in the user's profile directory is used to store cookies between sessions [2].
[1]: https://web.archive.org/web/20221029140819/https://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird "Files and folders in the profile | Thunderbird | kb.mozillazine.org"
[2]: https://web.archive.org/web/20221029140816/https://kb.mozillazine.org/Cookies.sqlite "Cookies.sqlite | Thunderbird | kb.mozillazine.org"
call:
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: cookies.sqlite
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: cookies.sqlite-wal
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: cookies.sqlite-journal
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: cookies.sqlite-shm
- name: Clear Thunderbird session restore (open windows and tabs)
docs: |-
The default window layout is saved in the session file (`session.json`) [1].
It includes data on what tabs are open [1].
[1]: https://web.archive.org/web/20221029140819/https://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird "Files and folders in the profile | Thunderbird | kb.mozillazine.org"
call:
function: DeleteFileFromThunderbirdProfiles
parameters:
file: session.json
- name: Clear Thunderbird accounts
docs: |-
`logins.json` stores encrypted passwords [1].
It replaces `signons.sqlite`, which had replaced `signons.txt` [1].
`logins-backup.json` is stored to recreate `logins.json` [2].
[1]: https://web.archive.org/web/20221029140819/https://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird "Files and folders in the profile | Thunderbird | kb.mozillazine.org"
[2]: https://web.archive.org/web/20221029141151/https://support.mozilla.org/id/questions/1362315#answer-1469311 "Mozilla Support | support.mozilla.org"
call:
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: logins.json
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: logins-backup.json
- name: Clear Thunderbird download history
docs: |-
Download history is saved in `downloads.sqlite` since Thunderbird 3 and in `downloads.rdf` before [1].
It stores data to show downloads in **Download Manager** [2].
Clearing download history can help to resolve slow downloads or program hangs [3].
[1]: https://web.archive.org/web/20221029140819/https://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird "Files and folders in the profile | Thunderbird | kb.mozillazine.org"
[2]: https://web.archive.org/web/20221029210450/https://kb.mozillazine.org/Downloads_not_visible_in_Download_Manager "Downloads not visible in Download Manager | Thunderbird | kb.mozillazine.org"
[3]: https://web.archive.org/web/20221029141349/https://bugzilla.mozilla.org/show_bug.cgi?id=159107 "159107 - page saving/downloads takes too much time (is slow) ('marooned' entries in downloads.rdf) | Mozilla Bug Report | bugzilla.mozilla.org"
call:
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: downloads.rdf # < Thunderbird 3
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: downloads.sqlite # >= Thunderbird 3
- category: Clear Thunderbird address book data
docs: |-
Most users open the Thunderbird address book from within the email client, but it can also be launched separately [1].
Mozilla Thunderbird by default comes with two address books, even though more can be added [2]:
1. **Personal book**: For the most frequently used contacts.
2. **Collected book**: Collects addresses from email that you send.
[1]: https://web.archive.org/web/20221029141424/https://wiki.mozilla.org/Thunderbird:Help_Documentation:Using_the_Address_Book "Thunderbird:Help Documentation:Using the Address Book | MozillaWiki | wiki.mozilla.org"
[2]: https://web.archive.org/web/20221029141448/https://support.mozilla.org/en-US/questions/1038172 "WHAT ARE COLLECTED ADDRESSES VS, PERSONAL ADDRESS BOOK | Thunderbird Support Forum | Mozilla Support | support.mozilla.org"
children:
- name: Clear Thunderbird personal address book
docs: |-
Files for personal addresses [1]:
- Since Thunderbird v78: `abook.sqlite`, `abook.sqlite-wal`.
- Before Thunderbird v78: `abook.mab`.
[1]: https://web.archive.org/web/20221029141501/https://www.recoverytools.com/blog/thunderbird-new-address-book/ "Thunderbird v78 Introduces New Address Book Formats (abook.sqlite) | RecoveryTools | recoverytools.com"
call:
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: abook.sqlite # >= Thunderbird v78
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: abook.sqlite-wal # >= Thunderbird v78
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: abook.mab # Thunderbird < v78
- name: Clear Thunderbird collected address book
docs: |-
Files for collected addresses [1]:
- Since Thunderbird v78: `history.sqlite`, `history.sqlite-wal`.
- Before Thunderbird v78: `history.mab`.
[1]: https://web.archive.org/web/20221029141501/https://www.recoverytools.com/blog/thunderbird-new-address-book/ "Thunderbird v78 Introduces New Address Book Formats (abook.sqlite) | RecoveryTools | recoverytools.com"
call:
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: history.sqlite # >= Thunderbird v78
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: history.sqlite-wal # >= Thunderbird v78
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: history.mab # Thunderbird < v78
- name: Clear Thunderbird's history of clicked links
docs: |-
Thunderbird saves annotations, bookmarks, favorite icons, input history, keywords, and browsing history
(a list of pages visited) [1].
Data is saved at persistent `places.sqlite` [1] and temporary `places.sqlite-shm` and `places.sqlite.wal` [2].
[1]: https://web.archive.org/web/20221029141626/https://kb.mozillazine.org/Places.sqlite "Places.sqlite | MozillaZine Knowledge Base | kb.mozillazine.org"
[2]: https://web.archive.org/web/20221029141631/https://bugzilla.mozilla.org/show_bug.cgi?id=686237 "686237 - places.sqlite-wal and places.sqlite-shm not removed on exit | Mozilla Bugs | bugzilla.mozilla.org"
call:
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: places.sqlite
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: places.sqlite-shm
- function: DeleteFileFromThunderbirdProfiles
parameters:
file: places.sqlite.wal
- category: Clear development tools data
docs: |-
This category includes tools that are typically used by developers, also known as "developer tools".
These tools allow a developer to create, test, and debug software.
Their data may leak data about the developer, his/her usage patterns, the environment used for development or the developed project.
children:
- name: Clear Python history
docs: |-
Python is a high-level, general-purpose programming language [1]. Python comes preinstalled on most Linux distributions [2].
Since Python 3.4 the interactive mode does log all commands to `~/.python_history` [3].
See also:
- [Source code](https://web.archive.org/web/20221029214327/https://github.com/python/cpython/blob/b2499669ef2e6dc9a2cdb49b4dc498e078167e26/Lib/site.py#L430-L451) that
creates the file and registers it.
- [Python homepage](https://web.archive.org/web/20221029214344/https://www.python.org/)
[1]: https://web.archive.org/web/20221029210646/https://en.wikipedia.org/wiki/Python_%28programming_language%29 "Python (programming language) | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029141851/https://docs.python.org/3/using/unix.html "Using Python on Unix platforms | Python documentation | docs.python.org"
[3]: https://web.archive.org/web/20221029141921/https://bugs.python.org/issue20886 "Issue 20886: Disabling logging to ~/.python_history is not simple enough | Python tracker | bugs.python.org"
call:
function: DeleteFileFromUserAndRootHome
parameters:
file: .python_history
- category: Clear Visual Studio Code data
docs: |-
Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft [1].
Visual Studio Code saves data that reveals user behavior and preferences.
[1]: https://web.archive.org/web/20221029142001/https://en.wikipedia.org/wiki/Visual_Studio_Code "Visual Studio Code | Wikipedia | en.wikipedia.org"
children:
- name: Clear Visual Studio Code Crash Reports
recommend: standard
docs: |-
Visual Studio Code stores crash reports that later on are uploaded to Microsoft servers by default [1].
It collects crash reports in `exthost Crash Reports` [1] and `Crash Reports` directories.
Deleting crash reports does not cause you any data loss that would affect your productivity.
[1]: https://web.archive.org/web/20221029142036/https://github.com/microsoft/vscode/blob/2948450d50c201acb40c8b10da305d8d3a293473/src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts#L280-L301 "vscode source code | GitHub | github.com"
call:
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: Crash\ Reports
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: exthost\ Crash\ Reports
- name: Clear Visual Studio Code cache
docs: |-
Unless you have unsaved changes, deleting the cache does not result in data loss [1].
However deleting cached data will lead to a slower initial experience as the files are cached again [1].
Visual Studio Code does not follow platform conventions for cache directories, but stores them in user data
directories instead [2].
Folders include `Cache`, `CachedData`, `Code Cache`, `GPUCache`, `CachedExtensions`, `CachedExtensionVSIXs` [3] [4].
[1]: https://web.archive.org/web/20221029142053/https://github.com/microsoft/vscode/issues/132509#issuecomment-914576815 "Provide functionality to delete temporary and cached files that do not affect core functionality · microsoft/vscode | GitHub | github.com"
[2]: https://web.archive.org/web/20221029142453/https://github.com/microsoft/vscode/issues/3884 "Revisit VS Code folder structure for app data, settings,extensions · Issue #3884 · microsoft/vscode | GitHub | github.com"
[3]: https://web.archive.org/web/20221029142505/https://github.com/microsoft/vscode/issues/126182#issue-919877609 "Cache files not stored under appropriate XDG directory · Issue #126182 · microsoft/vscode | GitHub | github.com"
[4]: https://web.archive.org/web/20221029142526/https://stackoverflow.com/questions/46246437/visual-studio-for-mac-cache-location/66295480 "macos - Visual Studio for Mac: Cache Location | Stack Overflow | stackoverflow.com"
call:
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: Cache
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: CachedData
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: Code\ Cache
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: GPUCache
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: CachedExtensions
- function: ClearDirFromVsCodeUserDataDir
parameters:
directory: CachedExtensionVSIXs
- name: Clear Visual Studio Code logs
recommend: standard
docs: |-
Deleting Visual Studio Code logs does not cause any data loss, but hides usage patterns.
The logs are stored in `{user data dir}/logs` folder [1].
[1]: https://web.archive.org/web/20221029142630/https://github.com/microsoft/vscode/blob/f0f4c8782190861ce7ad536eecca45edca7d2ac7/src/vs/platform/environment/common/environmentService.ts#L71-L78 "vscode/environmentService.ts · microsoft/vscode · GitHub | "
call:
function: ClearDirFromVsCodeUserDataDir
parameters:
directory: logs
- category: Clear Azure CLI data
docs: |-
The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources [1].
With an emphasis on automation, the Azure CLI is accessible across all Azure services and is made to work quickly with Azure [1].
[1]: https://web.archive.org/web/20221029142932/https://learn.microsoft.com/en-us/cli/azure/ "Azure Command-Line Interface (CLI) - Overview | Microsoft Learn | learn.microsoft.com"
children:
- name: Clear Azure CLI telemetry
recommend: standard
docs: |-
The Azure CLI stores telemetry in the `telemetry` directory and `telemetry.txt`, `logs/telemetry.txt` files [1].
[1]: https://web.archive.org/web/20221029142939/https://github.com/Azure/azure-cli/blob/29767d75d850ddc1c24cc85bd46d861b61d77a47/src/azure-cli-telemetry/azure/cli/telemetry/const.py "Azure CLI Source Code | GitHub | github.com"
code: |-
rm -rfv ~/.azure/telemetry
rm -fv ~/.azure/telemetry.txt
rm -fv ~/.azure/logs/telemetry.txt
- name: Clear Azure CLI logs
recommend: standard
docs: |-
Azure CLI saves logs in the `logs` directory [1].
[1]: https://web.archive.org/web/20221029143112/https://github.com/Azure/azure-cli/blob/87c9c3c5a46de622b38e1ec4d5797bb9a3eb9e6f/src/azure/cli/_logging.py#L23 "Azure CLI Source Code | GitHub | github.com"
code: rm -rfv ~/.azure/logs
- name: Clear Azure CLI cache
recommend: standard
docs: |-
This script deletes cached Azure CLI objects [1].
Cleaning cache does not remove your credentials, so you'll keep your session and be logged in.
[1]: https://web.archive.org/web/20221029143238/https://learn.microsoft.com/en-us/cli/azure/cache?view=azure-cli-latest#az_cache_purge "az cache | Microsoft Learn | learn.microsoft.com"
call:
function: RunIfCommandExists
parameters:
command: az
code: az cache purge
- name: Clear Azure login data (logs out of the current session)
recommend: strict
docs: |-
This script cleans the login data in three steps:
1. **`az logout`**:
It deletes the current authentication token and subscription ID [1].
It only logs out the selected/current user [1].
2. **`az account clear`**:
It clears all other subscriptions from the CLI's local cache [2].
It also logs out all users [2].
3. **Clear all access tokens**:
It removes the ADAL token cache file [3].
These are stored tokens from the Active Directory OAuth 2.0 code flow [4].
[1]: https://web.archive.org/web/20221029143252/https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#az-logout "az logout | Microsoft Learn | learn.microsoft.com"
[2]: https://web.archive.org/web/20221029144354/https://learn.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az_account_clear "az account clear | Microsoft Learn | learn.microsoft.com"
[3]: https://web.archive.org/web/20221029143409/https://github.com/Azure/azure-cli/blob/2e0a42f304f5fd543818a98a9eab2faf8d1fd6d6/src/azure-cli/azure/cli/command_modules/profile/custom.py#L215-L224 "Azure CLI source code | GitHub | github.com"
[4]: https://web.archive.org/web/20221029143429/https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow "Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra | Microsoft Learn | learn.microsoft.com"
call:
function: RunIfCommandExists
parameters:
command: az
code: |-
az logout 2&> /dev/null
az account clear
rm -fv ~/.azure/accessTokens.json
- category: Clear browser history
docs: |-
A web browser (commonly just called a browser) is software that is used to visit websites [1].
The browsing history, cache entries, and other potentially sensitive data are all stored by browsers [1].
[1]: https://web.archive.org/web/20221029193056/https://en.wikipedia.org/wiki/Web_browser "Web browser - Wikipedia | wikipedia.org"
children:
- category: Clear GNOME Web (Epiphany) history
docs: |-
GNOME Web (called Epiphany until 2012) is a free and open-source web browser based on the GTK port of Apple's WebKit rendering engine, called WebKitGTK [1].
It is developed by the GNOME project for Unix-like systems [1].
It is the default and official web browser of GNOME [1].
It has been the default browser of elementary OS since 5.0 [2] Bodhi Linux since 5.1.0 [3].
See also: [GNOME Web source code](https://web.archive.org/web/20221029214415/https://gitlab.gnome.org/GNOME/epiphany)
[1]: https://web.archive.org/web/20221029143523/https://en.wikipedia.org/wiki/GNOME_Web "GNOME Web | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029211521/https://medium.com/elementaryos/elementary-os-5-juno-is-here-471dfdedc7b3 "elementary OS 5 Juno is Here | medium.com"
[3]: https://web.archive.org/web/20221029211555/https://www.bodhilinux.com/2020/03/25/bodhi-linux-5-1-0-released/ "Bodhi Linux 5.1.0 Released | bodhilinux.com"
children:
- name: Clear GNOME Web cache
docs: This script clears the temporary cache and does not cause any user data loss.
code: |-
# Global installation
rm -rfv /.cache/epiphany/*
# Flatpak installation
rm -rfv ~/.var/app/org.gnome.Epiphany/cache/*
# Snap insallation
rm -rfv ~/~/snap/epiphany/common/.cache/*
- name: Clear GNOME Web browsing history
recommend: strict
docs: |-
Your browsing history consists of the web pages that you have visited [1].
The history database is `ephy-history.db` [2] and uses `-shm` and `-wal` files during operation [3].
[1]: https://web.archive.org/web/20220810160903/https://help.gnome.org/users/epiphany/stable/history.html.en "Browsing history | GNOME Help | help.gnome.org"
[2]: https://web.archive.org/web/20221030154804/https://gitlab.gnome.org/GNOME/epiphany/-/issues/1169 "Maintainer defining ephy-history.db | GNOME/epiphany | GitLab | gitlab.gnome.org"
[3]: https://web.archive.org/web/20221030154903/https://gitlab.gnome.org/GNOME/epiphany/-/issues/1642 "Logs showing ephy-history.db-shm | GNOME/epiphany | GitLab | gitlab.gnome.org"
call:
- function: DeleteFileFromGNOMEWebData
parameters:
file: ephy-history.db
- function: DeleteFileFromGNOMEWebData
parameters:
file: ephy-history.db-shm
- function: DeleteFileFromGNOMEWebData
parameters:
file: ephy-history.db-wal
- name: Clear GNOME Web cookies
recommend: strict
docs: |-
`cookies.sqlite` file is used to store cookies in WebKit-based browsers [1].
See also:
- [What are cookies? | GNOME Web | gnome.org](https://web.archive.org/web/20221029214420/https://help.gnome.org/users/epiphany/stable/cookies.html.en)
- [Delete a cookie | GNOME Web | gnome.org](https://web.archive.org/web/20221029214415/https://gitlab.gnome.org/GNOME/epiphany)
[1]: https://web.archive.org/web/20221029144608/https://bugs.webkit.org/show_bug.cgi?id=149551 "Discussion around cookies.sqlite in WebKit source code | WebKit Bugzilla | bugs.webkit.org"
call:
function: DeleteFileFromGNOMEWebData
parameters:
file: cookies.sqlite
- name: Clear GNOME Web bookmarks
docs: |-
Bookmarks are evidently stored in a file called `bookmarks.gvdb` [1].
See also [Bookmarks design | GNOME Wiki](https://web.archive.org/web/20221029214609/https://wiki.gnome.org/Design/Apps/Web/Bookmarks) to read more about GNOME Web bookmarks.
[1]: https://web.archive.org/web/20221029144626/https://gitlab.gnome.org/GNOME/epiphany/-/issues/198 "Discussion around bookmarks.gvdb | GNOME/epiphany | gitlab.gnome.org"
call:
function: DeleteFileFromGNOMEWebData
parameters:
file: bookmarks.gvdb
- category: Clear Firefox history
docs: |-
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and
its subsidiary the Mozilla Corporation [1].
Firefox stores user-related data in user profiles [2].
See also [the Firefox homepage](https://web.archive.org/web/20221029214632/https://www.mozilla.org/en-US/firefox/).
[1]: https://web.archive.org/web/20221029145113/https://en.wikipedia.org/wiki/Firefox "Firefox | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029145152/https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data "Profiles - Where Firefox stores your bookmarks, passwords and other user data | Firefox Help | support.mozilla.org"
children:
- name: Clear Firefox cache
recommend: standard
docs: |-
The cache gets stored `.cache` folder, which you can see when you navigate to `about:cache` [1] [2].
[1]: https://web.archive.org/web/20221029145216/https://support.mozilla.org/en-US/questions/1317032 "How to locate and change Firefox Cache storage location | Firefox Support Forum | Mozilla Support | support.mozilla.org"
[2]: https://web.archive.org/web/20221029145237/https://wiki.archlinux.org/title/Firefox/Profile_on_RAM "Firefox/Profile on RAM | ArchWiki | wiki.archlinux.org"
code: |-
# Global installation
rm -rfv ~/.cache/mozilla/*
# Flatpak installation
rm -rfv ~/.var/app/org.mozilla.firefox/cache/*
# Snap installation
rm -rfv ~/snap/firefox/common/.cache/*
- name: Clear Firefox Crash Reports
recommend: standard
docs: |-
Firefox stores crash reports in `~/.mozilla/firefox/Crash Reports/` to submit them later [1].
They are also seen to be stored in the profile directory [2].
You can run `about:crashes` in the address bar to see crash reports and their submission dates [1].
[1]: https://web.archive.org/web/20221029145258/https://support.mozilla.org/en-US/kb/mozillacrashreporter "Mozilla Crash Reporter | Firefox Help | support.mozilla.org"
[2]: https://web.archive.org/web/20221029145312/https://bugzilla.mozilla.org/show_bug.cgi?id=1653852#c16 "1653852 - Flatpak sandbox breaks crash reporting | Bugzilla | mozilla.org"
call:
- function: RunInlineCode
parameters:
code: |-
# Global installation
rm -fv ~/.mozilla/firefox/Crash\ Reports/*
# Flatpak installation
rm -rfv ~/.var/app/org.mozilla.firefox/.mozilla/firefox/Crash\ Reports/*
# Snap installation
rm -rfv ~/snap/firefox/common/.mozilla/firefox/Crash\ Reports/*
- function: DeleteFromFirefoxProfiles
parameters:
path: crashes/
- name: Clear Firefox cookies
docs: |-
Firefox Cookies are stored in the `cookies.sqlite` database, within the 'moz_cookies' table [1].
[1]: https://web.archive.org/web/20221029140816/https://kb.mozillazine.org/Cookies.sqlite "Cookies.sqlite - MozillaZine Knowledge Base | kb.mozillazine.org"
call:
function: DeleteFromFirefoxProfiles
parameters:
path: cookies.sqlite
- name: Clear Firefox URL history (downloads, bookmarks, website visits, annotations, icons, inputs, keywords)
docs: |-
The file "places.sqlite" stores the annotations, bookmarks, favorite icons, input history, keywords, and browsing history (a record of visited pages) [1].
The tables include [1]:
- `moz_anno_attributes`: Annotation Attributes
- `moz_annos`: Annotations
- `moz_bookmarks`: Bookmarks
- `moz_bookmarks_roots`: Bookmark roots i.e. places, menu, toolbar, tags, unfiled
- `moz_favicons`: Favourite icons - including URL of icon
- `moz_historyvisits`: A history of the number of times a site has been visited
- `moz_inputhistory`: A history of URLs typed by the user
- `moz_items_annos`: Item annotations
- `moz_keywords`: Keywords
- `moz_places`: Places/Sites visited - referenced by `moz_historyvisits`
URL data is stored in the `moz_places` table. However, this table is connected to `moz_annos`, `moz_bookmarks`, and `moz_inputhistory` and `moz_historyvisits`.
As these entries are connected to each other, we'll delete all of them at the same time [2].
**Bookmarks**:
Firefox bookmarks are stored in tables such as `moz_bookmarks`, `moz_bookmarks_folders`, `moz_bookmarks_roots` [3].
There are also not very well documented tables, such as `moz_bookmarks_deleted` [4].
**Downloads:**
Firefox downloads are stored in the 'places.sqlite' database, within the 'moz_annos' table [5].
The entries in `moz_annos` are linked to `moz_places` that store the actual history entry (`moz_places.id = moz_annos.place_id`) [6].
Associated URL information is stored within the 'moz_places' table [5].
Downloads have been historically stored in `downloads.rdf` for Firefox 2.x and below [7].
Starting with Firefox 3.x they're stored in `downloads.sqlite` [7].
**Favicons:**
Firefox favicons are stored in the `favicons.sqlite` database, within the `moz_icons` table [5].
Older versions of Firefox stored Favicons in the 'places.sqlite' database, within the `moz_favicons` table [5].
[1]: https://web.archive.org/web/20221029141626/https://kb.mozillazine.org/Places.sqlite "Places.sqlite - MozillaZine Knowledge Base | kb.mozillazine.org"
[2]: https://web.archive.org/web/20221030160803/https://wiki.mozilla.org/images/0/08/Places.sqlite.schema.pdf "Places.sqlite.schema.pdf | Mozilla Wiki"
[3]: https://web.archive.org/web/20221029145432/https://wiki.mozilla.org/Places:BookmarksComments "Places:BookmarksComments | MozillaWiki | wiki.mozilla.org"
[4]: https://web.archive.org/web/20221029145447/https://github.com/mozilla/application-services/issues/514 "Add a `moz_bookmarks_deleted` table for tombstones · Issue #514 · mozilla/application-services | GitHub | github.com"
[5]: https://web.archive.org/web/20221029145535/https://www.foxtonforensics.com/browser-history-examiner/firefox-history-location "Mozilla Firefox History Location | Firefox History Viewer | foxtonforensics.com"
[6]: https://web.archive.org/web/20221029145550/https://support.mozilla.org/en-US/questions/1319253 "Where does Firefox store SQLITE download history | Firefox Support Forum | Mozilla Support | support.mozilla.org"
[7]: https://web.archive.org/web/20221029145712/https://kb.mozillazine.org/Downloads.rdf "Downloads.rdf | MozillaZine Knowledge Base | kb.mozillazine.org"
call:
- function: DeleteFromFirefoxProfiles
parameters:
path: downloads.rdf
- function: DeleteFromFirefoxProfiles
parameters:
path: downloads.sqlite
- function: DeleteFromFirefoxProfiles
parameters:
path: places.sqlite
- function: DeleteFromFirefoxProfiles
parameters:
path: favicons.sqlite
- name: Clear Firefox logins
docs: |-
Logins for Firefox are saved in the `logins.json` file [1].
Older versions of Firefox stored logins in the `signons.sqlite` database, within the `moz_logins` table [1].
Back-ups are stored in the `logins-backup.json` file [2].
[1]: https://web.archive.org/web/20221029145535/https://www.foxtonforensics.com/browser-history-examiner/firefox-history-location "Mozilla Firefox History Location | Firefox History Viewer | foxtonforensics.com"
[2]: https://web.archive.org/web/20221029145757/https://bugzilla.mozilla.org/show_bug.cgi?id=1593467 "1593467 - Automatically restore from logins-backup.json when logins.json is missing or corrupt | Bugzilla | mozilla.org | bugzilla.mozilla.org"
call:
- function: DeleteFromFirefoxProfiles
parameters:
path: logins.json
- function: DeleteFromFirefoxProfiles
parameters:
path: logins-backup.json
- function: DeleteFromFirefoxProfiles
parameters:
path: signons.sqlite
- name: Clear Firefox autocomplete history
docs: |-
The `formhistory.sqlite` file remembers what you have searched for in the Firefox search bar
and what information you've entered into website forms [1].
[1]: https://web.archive.org/web/20221029145152/https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data "Profiles - Where Firefox stores your bookmarks, passwords and other user data | Firefox Help | support.mozilla.org"
call:
function: DeleteFromFirefoxProfiles
parameters:
path: formhistory.sqlite
- name: Clear Firefox multi-account containers data
docs: |-
The `containers.json` file stores the details of containers used by the [Container Tabs](https://web.archive.org/web/20221029214648/https://support.mozilla.org/en-US/kb/containers) feature [1].
[1]: https://web.archive.org/web/20221029145152/https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data "Profiles - Where Firefox stores your bookmarks, passwords and other user data | Firefox Help | support.mozilla.org"
call:
function: DeleteFromFirefoxProfiles
parameters:
path: containers.json
- name: Clear Firefox open tabs and windows data
docs: |-
The `sessionstore.jsonlz4` file stores the currently open tabs and windows [1].
See ["Restore previous session - Configure when Firefox shows your most recent tabs and windows"](https://web.archive.org/web/20221029220311/https://support.mozilla.org/en-US/kb/restore-previous-session).
[1]: https://web.archive.org/web/20221029145152/https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data "Profiles - Where Firefox stores your bookmarks, passwords and other user data | Firefox Help | support.mozilla.org"
call:
function: DeleteFromFirefoxProfiles
parameters:
path: sessionstore.jsonlz4
- category: Clear system and/or kernel data
docs: |-
Your system (operating system along with other software on it) and kernel store
data that may reveal your behavior and can be considered sensitive. These scripts clean
up the data that could potentially expose your user data.
children:
- name: Clear system crash report files
docs: |-
The `/var/crash` directory holds system crash dumps according to Filesystem Hierarchy Standard (FHS) [1].
You may get reports on a system's boot when crash report files exist.
When the `/var/crash` directory contains files, Apport will display notifications [2].
This directory is then cleaned up by Apport using [`/etc/cron.daily/apport`](https://web.archive.org/web/20221029220300/https://www.apt-browse.org/browse/ubuntu/precise/main/all/apport/2.0.1-0ubuntu5/file/etc/cron.daily/apport) job [6].
Read more: ["Apport | Ubuntu Wiki"](https://web.archive.org/web/20221029220354/https://wiki.ubuntu.com/Apport).
The folder typically contains kernel crash dumps [3], but it can be used by other applications as well.
E.g., the Debian package corekeeper stores user-space coredumps in subfolders of `/var/crash` [4].
Some systems, such as Ubuntu also put userspace crashes in this folder [5].
When using systemd to start services or processes, the crash logs are stored in the `/var/lib/systemd/coredump/`
directory [7].
[1]: https://web.archive.org/web/20221029145818/https://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html "Filesystem Hierarchy Standard | FHS | linuxfoundation.org"
[2]: https://web.archive.org/web/20221029150025/https://support.starlabs.systems/kb/guides/disable-program-problem-reports "Disable program problem reports | Star Labs | support.starlabs.systems"
[3]: https://web.archive.org/web/20221029150105/https://elinux.org/Crash_Diagnostics "Crash Diagnostics | eLinux.org"
[4]: https://web.archive.org/web/20221029150118/https://packages.debian.org/unstable/main/corekeeper "Details of package corekeeper in sid | packages.debian.org"
[5]: https://web.archive.org/web/20221029150311/https://wiki.ubuntu.com/AutomatedProblemReports "AutomatedProblemReports - Ubuntu Wiki | wiki.ubuntu.com"
[6]: https://web.archive.org/web/20221029150331/https://bugs.launchpad.net/apport/+bug/357024 "Bug #357024 (pertian7) “security hole in /etc/cron.daily/apport” : Bugs : Apport | bugs.launchpad.net"
[7]: https://web.archive.org/web/20221029211018/https://www.freedesktop.org/software/systemd/man/systemd-coredump.html "systemd-coredump | freedesktop.org"
code: |-
sudo rm -rfv /var/crash/*
sudo rm -rfv /var/lib/systemd/coredump/
- name: Clear system (journald) logs
docs: |-
journald is the part of systemd that captures, queries, and removes logs when needed [1].
It allows removing logs by setting `--vacuum-time` [2].
systemd is also known as "System and Service Manager" and is a suite of basic building blocks for a Linux system [3].
systemd keeps files in two places: `/var/log/journal/` (persistently) and `/run/log/journal/` (volatilely, the data is lost when the system is rebooted) [4].
[1]: https://web.archive.org/web/20221029211624/https://docs.google.com/document/pub?id=1IC9yOXj7j6cdLLxWEBAGRL6wl97tFxgjLUEHIX3MSTs&pli=1 "Paper announcing journald | docs.google.com"
[2]: https://web.archive.org/web/20221029150611/https://wiki.archlinux.org/title/Systemd/Journal#Clean_journal_files_manually "systemd/Journal - ArchWiki | Arch Linux documentation | archlinux.org | wiki.archlinux.org"
[3]: https://web.archive.org/web/20221026211029/https://systemd.io/ "Systemd Homepage | systemd.io"
[4]: https://web.archive.org/web/20221029150659/https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html "systemd-journald.service | freedesktop.org"
call:
- function: RunIfCommandExists
parameters:
command: journalctl
code: sudo journalctl --vacuum-time=1s
- function: RunInlineCode
parameters:
code: |-
sudo rm -rfv /run/log/journal/*
sudo rm -rfv /var/log/journal/*
- name: Clear Zeitgeist data (activity logs)
recommend: strict
docs: |-
Zeitgeist logs files opened, websites visited, conversations, and emails and provides
this information over an API to applications [1] [2].
It serves as a comprehensive activity log and also makes it possible to determine
relationships between items based on usage patterns [2].
This script deletes indexes (`fts.index` directory). It's safe to delete and will
be regenerated the next time you start Zeitgeist [3].
This script also deletes all activity logs (`activity.sqlite`) and related user-data.
[1]: https://web.archive.org/web/20221029150843/https://zeitgeist.freedesktop.org/ "The Zeitgeist Project | freedesktop.org"
[2]: https://web.archive.org/web/20221029150843/https://packages.debian.org/sid/libdevel/libzeitgeist-2.0-dev "Debian -- Details of package libzeitgeist-2.0-dev in sid | packages.debian.org"
[3]: https://web.archive.org/web/20221029150959/https://bugs.launchpad.net/ubuntu/+source/zeitgeist/+bug/941643 "Bug #941643 “activity.sqlite-wal's size increments dramatically” : Bugs : zeitgeist package : Ubuntu | Ubuntu Zeitgeist Package | bugs.launchpad.net"
code: |-
sudo rm -rfv {/root,/home/*}/.local/share/zeitgeist
- category: Clear recently used files list
docs: |-
Revealing data about recent files used by a user has privacy risks, such as exposing
your actions and files that you wish to keep private.
children:
- name: Clear GTK recently used files list
recommend: strict
docs: |-
`recently-used.xbel` is part of the GTK+ toolkit [1] that's developed and used by GNOME [2].
<gtk-recent-manager> provides a facility for adding, removing, and looking up recently used files
and acts like a database of all the recently used files [3].
GTK is used by many GUI software. GNOME uses the GTK+ library [2], while KDE uses the QT library [4].
`recently-used.xbel` is also used by other third-party GTK 3 based applications such as Firefox,
Visual Studio Code (and all other Electron applications [5]), Thunderbird…
See also: ["List of GTK applications | Wikipedia"](https://web.archive.org/web/20221029221112/https://en.wikipedia.org/wiki/List_of_GTK_applications).
[1]: https://web.archive.org/web/20221030164434/https://gitlab.gnome.org/GNOME/gtk/-/raw/1c3f179a20bf7537691216c28332f00c651a577f/gtk/gtkrecentmanager.c#L103 "Line 103 defines GTK_RECENTLY_USED_FILE as recently-used.xbel | GTK source code | gitlab.gnome.org"
[2]: https://web.archive.org/web/20221029151059/https://gtk.org/ "GTK homepage | gtk.org"
[3]: https://web.archive.org/web/20221029151529/https://www.gnu.org/software/guile-gnome/docs/gtk/html/GtkRecentManager.html "GtkRecentManager - Guile-Gtk | www.gnu.org"
[4]: https://web.archive.org/web/20221029151457/https://www.qt.io/faq/3.2.-why-do-you-have-an-agreement-with-kde-about-your-licensing-what-kde-is-and-whats-the-history-of-qt-and-kde "What's the history of Qt and KDE? | qt.io"
[5]: https://web.archive.org/web/20221029151534/https://github.com/electron/electron/issues/2927 "Consider replacing GTK2 w GTK3 in Linux builds · Issue #2927 · electron/electron | GitHub"
code: |-
# From global installations
rm -fv /.recently-used.xbel
rm -fv ~/.local/share/recently-used.xbel*
# From snap packages
rm -fv ~/snap/*/*/.local/share/recently-used.xbel
# From Flatpak packages
rm -fv ~/.var/app/*/data/recently-used.xbel
- name: Clear KDE-tracked recently used items list
recommend: strict
docs: |-
`.desktop` files are used by KDE to store recent documents and are exposed as an API [1].
They are not only specific to the desktop environment, but also used by applications.
Likewise, they are used by the KDE implementation of QT components, such as [QFileDialog](https://web.archive.org/web/20221029221146/https://doc.qt.io/qt-5/qfiledialog.html)
([KFileWidget](https://web.archive.org/web/20221029221152/https://api.kde.org/frameworks/kio/html/classKFileWidget.html)) [1].
Furthermore, they are used by other [KDE apps](https://web.archive.org/web/20221029221245/https://apps.kde.org/) and can even be used by GTK applications [1].
[1]: https://web.archive.org/web/20221029151634/https://api.kde.org/frameworks/kio/html/classKRecentDocument.html "KIO - KRecentDocument Class Reference | api.kde.org"
code: |-
# From global installations
rm -rfv ~/.local/share/RecentDocuments/*.desktop
rm -rfv ~/.kde/share/apps/RecentDocuments/*.desktop
rm -rfv ~/.kde4/share/apps/RecentDocuments/*.desktop
# From snap packages
rm -fv ~/snap/*/*/.local/share/*.desktop
# From Flatpak packages
rm -rfv ~/.var/app/*/data/*.desktop
- name: Clear trash
docs: |-
The trash location is standardized by ["The FreeDesktop.org Trash specification"](https://web.archive.org/web/20221029151648/https://specifications.freedesktop.org/trash-spec/trashspec-latest.html) [1].
It uses the `$XDG_DATA_HOME/Trash` directory, [1] which defaults to `$HOME/.local/share/Trash` [2].
Flatpak applications may use the same trash using special APIs [3]. However, Snap applications do not have an API to
use the global trash [4].
[1]: https://web.archive.org/web/20221029151648/https://specifications.freedesktop.org/trash-spec/trashspec-latest.html "The FreeDesktop.org Trash specification | freedesktop.org"
[2]: https://web.archive.org/web/20221029151712/https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html "XDG Base Directory Specification | freedesktop.org"
[3]: https://web.archive.org/web/20221029151919/https://docs.flatpak.org/en/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.Trash "Portal API Reference - Flatpak documentation | docs.flatpak.org"
[4]: https://web.archive.org/web/20221029151931/https://bugs.launchpad.net/snapd/+bug/1787903 "Bug #1787903 “Snapped application can't access user's trash can” : Bugs : snapd | bugs.launchpad.net"
code: |-
# Empty global trash
rm -rfv ~/.local/share/Trash/*
sudo rm -rfv /root/.local/share/Trash/*
# Empty Snap trash
rm -rfv ~/snap/*/*/.local/share/Trash/*
# Empty Flatpak trash (apps may not choose to use Portal API)
rm -rfv ~/.var/app/*/data/Trash/*
- name: Clear global temporary folders
docs: |-
A temporary folder or temporary directory is a directory used to hold temporary files [1].
In Unix and Linux, the global temporary directories are `/tmp` [2] and `/var/tmp` [1]. Typically,
`/var/tmp` is for persistent files (as it may be preserved over reboots), and `/tmp` is for more
temporary files [1].
Programs do not assume that any files or directories in temporary folders are preserved between
invocations of the program, and these files may be deleted after reboot and in a site-specific manner [2].
See also: "[Filesystem Hierarchy Standard](https://web.archive.org/web/20221029152204/https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s18.html)".
[1]: https://web.archive.org/web/20221029152135/https://en.wikipedia.org/wiki/Temporary_folder "Temporary folder | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029152204/https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s18.html "Filesystem Hierarchy Standard | LinuxFoundation.org"
code: |-
sudo rm -rfv /tmp/*
sudo rm -rfv /var/tmp/*
- category: Clear package manager data
docs: |-
Package managers store caches, statistics, and logs that may reveal data on how you use the package
managers and software downloaded from them, such as your choice of software.
children:
- name: Clear YUM/RPM data
docs: |-
The Yellowdog Updater, Modified (YUM) is a free and open-source command-line package-management
utility for computers running the Linux operating system using the RPM Package Manager [1].
It has been shipped by default by distros such as Fedora, Rocky Linux, AlmaLinux, CentOS [2].
YUM stores cached packages, header files, and metadata to determine the remote availability of packages,
SQLite database cache, rpmdb cache [3]. Every YUM plugin may store its own cache [3]. `yum clean all`
cleans all temporary files.
See also: ["Yum Package Manager homepage"](https://web.archive.org/web/20221029221419/http://yum.baseurl.org/).
[1]: https://web.archive.org/web/20221029152219/https://en.wikipedia.org/wiki/Yum_%28software%29 "Yum | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029152251/https://webhome.phy.duke.edu/~rgb/General/yum_article/yum_article.pdf "YUM: Yellowdog Updater, Modified | www.phy.duke.edu"
[3]: https://web.archive.org/web/20221029152334/https://linux.die.net/man/8/yum "yum: Yellowdog Updater Modified - Linux man page | linux.die.net"
call:
function: RunIfCommandExists
parameters:
command: yum
code: yum clean all --enablerepo='*'
- name: Clear DNF/RPM data
docs: |-
DNF or Dandified YUM is the next-generation version of YUM, a package manager for
.rpm-based Linux distributions [1].
It has been the default package manager since Fedora 22 in 2015, Red Hat Enterprise Linux 8,
and OpenMandriva [1].
DNF stores temporary files for repositories such as repository metadata, cache files
generated from the repository metadata, and cached packages [2]. `dnf clean all` cleans
all temporary files [2].
[1]: https://web.archive.org/web/20221029152448/https://en.wikipedia.org/wiki/DNF_%28software%29 "DNF (software) | Wikipedia | en.wikipedia.org"
[2]: https://web.archive.org/web/20221029152515/https://manpages.ubuntu.com/manpages/kinetic/en/man8/dnf.8.html "Ubuntu Manpage: dnf - DNF Command Reference | manpages.ubuntu.com"
call:
function: RunIfCommandExists
parameters:
command: dnf
code: dnf clean all --enablerepo='*'
- category: Clear Snap data
docs: |-
Snap is a software packaging and deployment system developed by Canonical [1].