Solved Junk in /usr/local/

Hi,
I have got lots of junk in /usr/local/bin (e.g. llvm-ar33.NXbZy5wizlal, wine.SOTPzkg6y2oU, winemine.4O58T2wKqxvM) and other directories.

How to remove 'mechanical' (not by rm -rf ... ) these unnecessary files?

Thanks.
 
To delete them we can do ls /usr/local/bin/*.???????????? > filelist. Edit filelist to make sure there is nothing important in there then run xargs rm < filelist.

Also a xargs pkg which < filelist reveals they are not part of any package.
 
Thanks for answer.
I ran short test...
Output:
Code:
# smartctl -a /dev/ada0
smartctl 6.4 2015-06-04 r4109 [FreeBSD 10.3-BETA2 amd64] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:  Western Digital Scorpio Blue Serial ATA
Device Model:  WDC WD5000BEVT-22ZAT0
Serial Number:  WD-WX40A9986999
LU WWN Device Id: 5 0014ee 203722521
Firmware Version: 01.01A01
User Capacity:  500 107 862 016 bytes [500 GB]
Sector Size:  512 bytes logical/physical
Rotation Rate:  5400 rpm
Device is:  In smartctl database [for details use: -P show]
ATA Version is:  ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:  Tue Mar  1 21:04:35 2016 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)   Offline data collection activity
           was never started.
           Auto Offline Data Collection: Disabled.
Self-test execution status:  (  0)   The previous self-test routine completed
           without error or no self-test has ever
           been run.
Total time to complete Offline
data collection:      (13560) seconds.
Offline data collection
capabilities:         (0x7b) SMART execute Offline immediate.
           Auto Offline data collection on/off support.
           Suspend Offline collection upon new
           command.
           Offline surface scan supported.
           Self-test supported.
           Conveyance Self-test supported.
           Selective Self-test supported.
SMART capabilities:  (0x0003)   Saves SMART data before entering
           power-saving mode.
           Supports SMART auto save timer.
Error logging capability:  (0x01)   Error logging supported.
           General Purpose Logging supported.
Short self-test routine
recommended polling time:     (  2) minutes.
Extended self-test routine
recommended polling time:     ( 158) minutes.
Conveyance self-test routine
recommended polling time:     (  5) minutes.
SCT capabilities:     (0x303f)   SCT Status supported.
           SCT Error Recovery Control supported.
           SCT Feature Control supported.
           SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG  VALUE WORST THRESH TYPE  UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate  0x002f  200  200  051  Pre-fail  Always  -  1673
  3 Spin_Up_Time  0x0027  180  173  021  Pre-fail  Always  -  1991
  4 Start_Stop_Count  0x0032  093  093  000  Old_age  Always  -  7305
  5 Reallocated_Sector_Ct  0x0033  200  200  140  Pre-fail  Always  -  0
  7 Seek_Error_Rate  0x002e  200  200  000  Old_age  Always  -  0
  9 Power_On_Hours  0x0032  082  082  000  Old_age  Always  -  13144
10 Spin_Retry_Count  0x0033  100  100  051  Pre-fail  Always  -  0
11 Calibration_Retry_Count 0x0032  100  100  000  Old_age  Always  -  0
12 Power_Cycle_Count  0x0032  097  097  000  Old_age  Always  -  3665
192 Power-Off_Retract_Count 0x0032  200  200  000  Old_age  Always  -  201
193 Load_Cycle_Count  0x0032  097  097  000  Old_age  Always  -  309958
194 Temperature_Celsius  0x0022  119  089  000  Old_age  Always  -  28
196 Reallocated_Event_Count 0x0032  200  200  000  Old_age  Always  -  0
197 Current_Pending_Sector  0x0032  200  200  000  Old_age  Always  -  0
198 Offline_Uncorrectable  0x0030  100  253  000  Old_age  Offline  -  0
199 UDMA_CRC_Error_Count  0x0032  200  200  000  Old_age  Always  -  0
200 Multi_Zone_Error_Rate  0x0009  200  200  051  Pre-fail  Offline  -  0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description  Status  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline  Completed without error  00%  13144  -
# 2  Short offline  Completed without error  00%  12866  -
# 3  Short offline  Completed without error  00%  12581  -
# 4  Short offline  Completed without error  00%  9082  -
# 5  Short offline  Completed without error  00%  8984  -
# 6  Short offline  Completed without error  00%  8825  -
# 7  Short offline  Completed without error  00%  8796  -
# 8  Short offline  Completed without error  00%  8601  -
# 9  Short offline  Completed without error  00%  8394  -
#10  Short offline  Completed without error  00%  7232  -
#11  Short offline  Aborted by host  90%  5480  -
#12  Short offline  Completed without error  00%  5480  -
#13  Extended offline  Completed without error  00%  4214  -
#14  Extended offline  Aborted by host  90%  4211  -

SMART Selective self-test log data structure revision number 1
SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
  1  0  0  Not_testing
  2  0  0  Not_testing
  3  0  0  Not_testing
  4  0  0  Not_testing
  5  0  0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Seems disk is ok.
 
They seem to be 2 copies of the same file i.e. diff gcc48 gcc48.ck2y3ADRQUGY returns nothing (files are also not linked in any way and have different inodes).
 
Yes, the disk looks perfect. I have no idea which mechanism could generate that kind of stuff on /usr/local/bin by mktemp(1). Please follow tobik, he is for sure much more experienced than myself.
 
They are in /usr/local so my guess is ports-mgmt/pkg that might leave behind files that fail the checksum check when the package is uninstalled or replaced with an updated one.
 
Back
Top