I don't know what your loop looks like but x may never be reaching 580. Or, your loop may be waiting for x to become 580 and stop before your conditional has a chance to be tested. In which case, x is 580, but the loop stopped before your test.
Like indi wrote, you can remove them from the viewable area, hide them, and delete them after your other updates. Here's an example based on my supposition that your test for x >= 580 is being skipped.
sync on
sync rate 60
rem make a box that is a sprite
box 0,0,100,100
get image 1,0,0,101,101
cls
rem Let's guarantee that the test of x will be met.
rem set up our loop bigger than what we are testing for because
rem we are going to break out of it when our condition is met and not
rem continue to cycle through it. This could be the main DO LOOP, but
rem I chose WHILE for a finite number of iterations
while x < 700
inc x
sprite 1,x,100,1
if x >= 380 then goto _removesprite
rem there could be other commands and stuff
sync
endwhile
rem a subprocedure to do stuff to a sprite we want to disappear
_removesprite:
sprite 1,-99,0,1
center text screen width()/2,170,"The Sprite is Peeking out a little for this example."
center text screen width()/2,200,"This could've been moved completely off-screen."
center text screen width()/2,230,"Now let's take indi's advice and hide it."
center text screen width()/2,260,"Press Enter to hide Sprite."
wait key
hide sprite 1
center text screen width()/2,290,"Delete it after your other program updates."
center text screen width()/2,320,"Press Enter to Delete Sprite."
wait key
delete sprite 1
cls
print "DONE!"
Enjoy your day.