Bellow command script generate script to kill active and inactive sessions on your instance that it connected to you database:
select 'alter system kill session '''||s.sid||','||s.serial#||''';' from v$session s;
to specify the status of sessions that you want to kill you can easily do that by execute the bellow script :
select 'alter system kill session '''||s.sid||','||s.serial#||''';' from v$session s where s.status='INACTIVE/ACTIVE';

select 'alter system kill session '''||s.sid||','||s.serial#||''';' from v$session s;
to specify the status of sessions that you want to kill you can easily do that by execute the bellow script :
select 'alter system kill session '''||s.sid||','||s.serial#||''';' from v$session s where s.status='INACTIVE/ACTIVE';
